-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modify shell scripts to pass shellcheck --severity=warning (open-tele…
…metry#3371) * Pass shellcheck --severity=warning and add CI to ensure such * Also include *.sh.template files for shellcheck --------- Co-authored-by: Piotr Kiełkowicz <[email protected]>
- Loading branch information
Showing
5 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Shellcheck | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
merge_group: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install shellcheck | ||
run: sudo apt update && sudo apt install --assume-yes shellcheck | ||
|
||
- name: Run shellcheck | ||
run: find . -name \*.sh -o -name \*.sh.template | xargs shellcheck --severity=warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,4 +169,4 @@ if [ "$ENABLE_PROFILING" = "true" ]; then | |
fi | ||
fi | ||
|
||
$@ | ||
exec "$@" |
7 changes: 4 additions & 3 deletions
7
nuget/OpenTelemetry.AutoInstrumentation/contentFiles/any/any/instrument.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,17 @@ | ||
#!/bin/sh | ||
|
||
BASE_PATH="$(cd $(dirname "$0") && pwd)" | ||
BASE_PATH="$(cd "$(dirname "$0")" && pwd)" | ||
|
||
# Settings for .NET | ||
export ASPNETCORE_HOSTINGSTARTUPASSEMBLIES=OpenTelemetry.AutoInstrumentation.AspNetCoreBootstrapper | ||
export CORECLR_ENABLE_PROFILING=1 | ||
export CORECLR_PROFILER="{918728DD-259F-4A6A-AC2B-B85E1B658318}" | ||
export CORECLR_PROFILER_PATH=$(ls ${BASE_PATH}/OpenTelemetry.AutoInstrumentation.Native.*) | ||
CORECLR_PROFILER_PATH="$(ls ${BASE_PATH}/OpenTelemetry.AutoInstrumentation.Native.*)" | ||
export CORECLR_PROFILER_PATH | ||
export DOTNET_STARTUP_HOOKS=${BASE_PATH}/OpenTelemetry.AutoInstrumentation.StartupHook.dll | ||
|
||
# Settings for OpenTelemetry | ||
export OTEL_DOTNET_AUTO_HOME=${BASE_PATH} | ||
export OTEL_DOTNET_AUTO_RULE_ENGINE_ENABLED=false | ||
|
||
$@ | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters