gitlab-ci: add shellcheck to gradlew-fdroid checks

This commit is contained in:
Hans-Christoph Steiner 2023-12-13 21:08:12 +01:00
parent 45d1363a0e
commit 9d8c098f74
2 changed files with 5 additions and 3 deletions

View File

@ -180,7 +180,7 @@ arch_pip_install:
# The gradlew-fdroid tests are isolated from the rest of the test
# suite, so they run as their own job.
gradlew-fdroid:
image: debian:bullseye
image: debian:bullseye-slim
<<: *apt-template
only:
changes:
@ -188,7 +188,8 @@ gradlew-fdroid:
- gradlew-fdroid
- tests/test-gradlew-fdroid
script:
- apt-get install ca-certificates curl default-jdk-headless unzip
- apt-get install ca-certificates curl default-jdk-headless shellcheck unzip
- shellcheck --severity=error --color gradlew-fdroid tests/test-gradlew-fdroid
- ./tests/test-gradlew-fdroid

View File

@ -20,6 +20,7 @@ run_gradle() {
if [ ! -d "${gradle_version_dir}/${v_found}" ]; then
download_gradle ${v_found}
fi
# shellcheck disable=SC2145
echo "Running ${gradle_version_dir}/${v_found}/bin/gradle ${args[@]}"
"${gradle_version_dir}/${v_found}/bin/gradle" "${args[@]}"
exit $?
@ -264,7 +265,7 @@ fi
if [[ -n $plugin_pver ]]; then
i=0
match=false
for k in ${d_gradle_plugin_ver_k[@]}; do
for k in "${d_gradle_plugin_ver_k[@]}"; do
if [[ $plugin_pver == ${k}* ]]; then
plugin_ver=${d_plugin_min_gradle_v[$i]}
match=true