Skip to content
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

Merged
merged 1 commit into from
Jul 2, 2019
Merged

Conversation

stevendanna
Copy link
Contributor

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]

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]>
@stevendanna stevendanna requested a review from a team as a code owner July 2, 2019 12:43
Copy link
Contributor

@srenatus srenatus left a 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)
Copy link
Contributor

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,

Suggested change
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.

Copy link
Contributor Author

@stevendanna stevendanna Jul 2, 2019

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants