-
Notifications
You must be signed in to change notification settings - Fork 114
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
[CI] Start shellchecking some scripts #742
Conversation
We have a LOT of bash and shell in this repository. shellcheck can help catch errors and other shell gotcha's. This PR gets us started by applying it to one small set of files. Signed-off-by: Steven Danna <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 💯
@@ -18,8 +18,8 @@ HAB_VERSION=$HAB_SUP_VERSION | |||
HAB_RELEASE=$(curl "https://bldr.habitat.sh/v1/depot/channels/core/stable/pkgs/hab/$HAB_VERSION/latest" | jq -r .ident.release) | |||
|
|||
HAB_LAUNCH_IDENT_JSON=$(curl "https://bldr.habitat.sh/v1/depot/channels/core/stable/pkgs/hab-launcher/latest" | jq -r .ident) | |||
HAB_LAUNCH_VERSION=$(echo $HAB_LAUNCH_IDENT_JSON | jq -r .version) | |||
HAB_LAUNCH_RELEASE=$(echo $HAB_LAUNCH_IDENT_JSON | jq -r .release) | |||
HAB_LAUNCH_VERSION=$(echo "$HAB_LAUNCH_IDENT_JSON" | jq -r .version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[bikeshed] I prefer args, like,
HAB_LAUNCH_VERSION=$(echo "$HAB_LAUNCH_IDENT_JSON" | jq -r .version) | |
HAB_LAUNCH_VERSION=$(jq -nr --argjson ident "$HAB_LAUNCH_IDENT_JSON" '$ident.version') |
But it might be overkill and at any rate, out-of-scope for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this too (having just learned of it this morning), but I'm gonna leave it out here since these are all more or less mechanical corrections.
@@ -2,11 +2,11 @@ | |||
|
|||
set -e | |||
|
|||
echo "Install latest dep" | |||
echo "Install latest dep and other tools" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
We have a LOT of bash and shell in this repository. shellcheck can
help catch errors and other shell gotcha's. This PR gets us started by
applying it to one small set of files.
Signed-off-by: Steven Danna [email protected]