gitlab-ci: make gradle job show files with trigger it

For some reason, this logic thinks that this merge request has changed
makebuildserver and/or gradlew-fdroid, though it clearly has not. This
should shed some light on it.

https://gitlab.com/fdroid/fdroidserver/-/jobs/9835383262
This commit is contained in:
Hans-Christoph Steiner 2025-04-25 22:22:35 +02:00
parent f281068cbf
commit 677301bc8a

View File

@ -469,6 +469,8 @@ macOS:
gradle:
image: debian:bookworm-slim
rules:
- if: "$PERSONAL_ACCESS_TOKEN"
<<: *apt-template
variables:
GIT_DEPTH: 1000
@ -485,12 +487,15 @@ gradle:
python3-requests
# if this is a merge request fork, then only check if relevant files changed
- if [ "$CI_PROJECT_NAMESPACE" != "fdroid" ]; then
set -x;
git fetch https://gitlab.com/fdroid/fdroidserver.git;
for f in `git diff --name-only --diff-filter=d FETCH_HEAD...HEAD`; do
test "$f" == "makebuildserver" && export CHANGED="yes";
test "$f" == "gradlew-fdroid" && export CHANGED="yes";
test "$f" == "makebuildserver" && export CHANGED="$f $CHANGED";
test "$f" == "gradlew-fdroid" && export CHANGED="$f $CHANGED";
done;
test -z "$CHANGED" && exit;
echo $CHANGED;
set +x;
fi
- ./tests/gradle-release-checksums.py