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

build: Tidy up scripts #111

Merged
merged 1 commit into from
Jan 12, 2021
Merged

build: Tidy up scripts #111

merged 1 commit into from
Jan 12, 2021

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Jan 12, 2021

This commit allows us to add shellcheck to CI in a later commit.

Changes:

  • Double-quote variable expansions (resolves SC2086 shellcheck
    warnings).
  • Use lowercase for script-scoped variables, leaving uppercase for
    environmental variables.
  • Prefer "${my_variable}" to "$my_variable".
  • Resolve SC2035 warning in bin/format.

shellcheck action output after this commit:

Run ludeeus/action-shellcheck@master
Files: ./.github/bin/publish-release ./.github/bin/create-artifact ./.github/bin/linux-install-build-tools ./.github/bin/build ./scripts/fetch-configlet_v3 ./bin/release ./bin/format
Excluded: ! -path *./.git/* ! -path *.go ! -path */mvnw
Options: 
Status code: 0

And before this commit:

In ./.github/bin/publish-release line 3:
VERSION=$(echo $REF | cut -d "/" -f3)
Error:                ^--^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
VERSION=$(echo "$REF" | cut -d "/" -f3)


In ./.github/bin/publish-release line 5:
gh release create $VERSION
Error:                   ^------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
gh release create "$VERSION"


In ./.github/bin/publish-release line 6:
gh release upload $VERSION $ARTIFACT_FILE
Error:                   ^------^ SC2086: Double quote to prevent globbing and word splitting.
                           ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
gh release upload "$VERSION" "$ARTIFACT_FILE"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

In ./.github/bin/create-artifact line 11:
    7z a $ARTIFACT_FILE $BINARY_NAME.exe
Error:          ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    7z a "$ARTIFACT_FILE" $BINARY_NAME.exe


In ./.github/bin/create-artifact line 15:
    tar -cvzf $ARTIFACT_FILE $BINARY_NAME
Error:               ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    tar -cvzf "$ARTIFACT_FILE" $BINARY_NAME


In ./.github/bin/create-artifact line 19:
    tar -cvzf $ARTIFACT_FILE $BINARY_NAME
Error:               ^------------^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
    tar -cvzf "$ARTIFACT_FILE" $BINARY_NAME

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

In ./bin/release line 26:
bump --v --$BUMP "$MESSAGE"
Error:            ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
bump --v --"$BUMP" "$MESSAGE"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

In ./bin/format line 3:
nimpretty **/*.nim
Error:           ^-- SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.

For more information:
  https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name...
Files: ./.github/bin/publish-release ./.github/bin/create-artifact ./.github/bin/linux-install-build-tools ./.github/bin/build ./scripts/fetch-configlet_v3 ./bin/release ./bin/format
Excluded: ! -path *./.git/* ! -path *.go ! -path */mvnw
Options: 
Status code: 1
Error: Process completed with exit code 1.

This commit allows us to add `shellcheck` to CI in a later commit.

Changes:
- Double-quote variable expansions (resolves SC2086 shellcheck
  warnings).
- Use lowercase for script-scoped variables, leaving uppercase for
  environmental variables.
- Prefer "${my_variable}" to "$my_variable".
- Resolve SC2035 warning in `bin/format`.
@ee7 ee7 merged commit a6f1235 into exercism:master Jan 12, 2021
@ee7 ee7 deleted the build-tidy-up-scripts branch January 12, 2021 11:48
ee7 added a commit to ee7/exercism-configlet that referenced this pull request Jan 21, 2021
This commit allows us to add `shellcheck` to CI in a later commit.

Changes:
- Double-quote variable expansions (resolves SC2086 shellcheck
  warnings).
- Use lowercase for script-scoped variables, leaving uppercase for
  environmental variables.
- Prefer "${my_variable}" to "$my_variable".
- Resolve SC2035 warning in `bin/format`.
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