Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Commit

Permalink
CI: Always download the latest Shellcheck version
Browse files Browse the repository at this point in the history
The previous logic was also semantically incorrect, as the file was never cached, therefore, the `if` was redundant.
  • Loading branch information
64kramsystem committed Apr 24, 2021
1 parent 6bdb11b commit b83243d
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions ci/run_shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ set -o nounset
set -o errtrace
shopt -s inherit_errexit

if [[ ! -e /opt/shellcheck/shellcheck ]]; then
mkdir -p /opt/shellcheck
# Always download the latest version:
#
# - it's fast and stable enough not to worry about it;
# - the workflow is basically single-person, so there's no risk of a new dev encountering an error found
# by a new shellcheck version.

wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz \
| tar xJv -O shellcheck-stable/shellcheck \
> /opt/shellcheck/shellcheck
mkdir -p /opt/shellcheck

chmod +x /opt/shellcheck/shellcheck
fi
wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz \
| tar xJv -O shellcheck-stable/shellcheck \
> /opt/shellcheck/shellcheck

chmod +x /opt/shellcheck/shellcheck

/opt/shellcheck/shellcheck --version

Expand Down

0 comments on commit b83243d

Please sign in to comment.