CI: use shellcheck from Alpine again (MR 2691)

Shellcheck is back in Alpine's repos.

This reverts commit 80e35c5eb0.
This commit is contained in:
Newbyte 2021-11-18 18:20:41 +01:00
parent 04f2850483
commit 70be414133
No known key found for this signature in database
GPG key ID: 0BF4C1B5988C50D8
2 changed files with 3 additions and 16 deletions

View file

@ -13,21 +13,6 @@ if grep -qr '(CHANGEME!)' *; then
exit 1
fi
# Shellcheck isn't in Alpine anymore, so just download the static binary in CI
# Related: https://gitlab.alpinelinux.org/alpine/aports/-/issues/10902
if [ "$DOWNLOAD_SHELLCHECK" = 1 ]; then
pkgver="0.7.2"
tmpdir="/tmp/shellcheck-$pkgver"
url="https://github.com/koalaman/shellcheck/releases/download/v$pkgver/shellcheck-v$pkgver.linux.x86_64.tar.xz"
mkdir -p "$tmpdir"
if ! [ -e "$tmpdir"/rel.tar.xz ]; then
echo "Downloading $url"
wget -q -O "$tmpdir"/rel.tar.xz "$url"
fi
tar -C "$tmpdir" -xf "$tmpdir"/rel.tar.xz
export PATH="$tmpdir/shellcheck-v$pkgver/:$PATH"
fi
# Shell: shellcheck
sh_files="
./main/mdss-fb-init-hack/mdss-fb-init-hack.sh

View file

@ -56,8 +56,10 @@ shellcheck:
stage: lint
<<: *only-default
image: alpine:edge
before_script:
- apk -q add shellcheck
script:
- DOWNLOAD_SHELLCHECK=1 .ci/shellcheck.sh
- .ci/shellcheck.sh
# aports checks (generic)
aports-static: