CI: Always download the latest Shellcheck version
The previous logic was also semantically incorrect, as the file was never cached, therefore, the `if` was redundant.
This commit is contained in:
parent
6bdb11b6a8
commit
b83243d3f2
|
@ -6,7 +6,12 @@ set -o nounset
|
||||||
set -o errtrace
|
set -o errtrace
|
||||||
shopt -s inherit_errexit
|
shopt -s inherit_errexit
|
||||||
|
|
||||||
if [[ ! -e /opt/shellcheck/shellcheck ]]; then
|
# 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.
|
||||||
|
|
||||||
mkdir -p /opt/shellcheck
|
mkdir -p /opt/shellcheck
|
||||||
|
|
||||||
wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz \
|
wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz \
|
||||||
|
@ -14,7 +19,6 @@ if [[ ! -e /opt/shellcheck/shellcheck ]]; then
|
||||||
> /opt/shellcheck/shellcheck
|
> /opt/shellcheck/shellcheck
|
||||||
|
|
||||||
chmod +x /opt/shellcheck/shellcheck
|
chmod +x /opt/shellcheck/shellcheck
|
||||||
fi
|
|
||||||
|
|
||||||
/opt/shellcheck/shellcheck --version
|
/opt/shellcheck/shellcheck --version
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue