-
Notifications
You must be signed in to change notification settings - Fork 333
WPB-2568 Fix shellcheck linting problems on all shell scripts #4220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix shellcheck problems in all shell scripts |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,9 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." | ||
|
|
||
| set -x | ||
|
|
||
| IFS=$'\n' | ||
| for NAMESPACE in $(kubectl get namespaces | grep "^test-" | awk '{print $1}'); do | ||
|
|
||
| echo "$NAMESPACE" | ||
| kubectl delete namespace "$NAMESPACE" & | ||
|
|
||
| done |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,16 +2,18 @@ | |||||||||
|
|
||||||||||
| set -euo pipefail | ||||||||||
|
|
||||||||||
| : ${HELM_SERVER_PORT:=4001} | ||||||||||
| : "${HELM_SERVER_PORT:=4001}" | ||||||||||
|
|
||||||||||
| # get rid of all helm repositories | ||||||||||
| # We need to deal with helm repo list failing because of https://github.com/helm/helm/issues/10028 | ||||||||||
| (helm repo list -o json || echo '[]') | jq -r '.[] | .name' | xargs -I% helm repo remove % | ||||||||||
|
|
||||||||||
| cd "$(dirname "$BASH_SOURCE[0]")/../../.local/charts" | ||||||||||
| for chart in $@; do | ||||||||||
| SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||||||||||
| cd "$SCRIPT_DIR/../../.local/charts" | ||||||||||
|
Comment on lines
+11
to
+12
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thought: This seems a bit convoluted to me: we temporarily change directory just to print its name, then cd into that again. suggestion: I think using
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the solution is from https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script It probably went through a lot of discussion, so I wouldn't wanna change it |
||||||||||
|
|
||||||||||
| for chart in "$@"; do | ||||||||||
| ../../hack/bin/update.sh "$chart" | ||||||||||
| helm package "$chart" | ||||||||||
| done | ||||||||||
| helm repo index . | ||||||||||
| python3 -m http.server $HELM_SERVER_PORT | ||||||||||
| python3 -m http.server "$HELM_SERVER_PORT" | ||||||||||
Uh oh!
There was an error while loading. Please reload this page.