mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-05-19 12:19:10 +00:00
gitlab-ci: fix checkupdates_filter exit code
! has meaning in YAML, and dealing with conflicting YAML vs bash quoting and escaping is a nightmare. So just use if/then/else.
This commit is contained in:
parent
d521eed82c
commit
9ca0ac6e42
1 changed files with 8 additions and 2 deletions
|
|
@ -485,11 +485,17 @@ check_git_repos:
|
|||
checkupdates_filter:
|
||||
image: debian:bookworm-slim
|
||||
stage: test
|
||||
needs: []
|
||||
rules:
|
||||
- if: $CI_PROJECT_PATH == 'fdroid/checkupdates-bot-fdroiddata'
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get -qy install --no-install-recommends ca-certificates git
|
||||
- git fetch https://gitlab.com/fdroid/fdroiddata.git
|
||||
- echo "Checking for modifications to restricted paths:"
|
||||
- ! (git diff --merge-base FETCH_HEAD HEAD --name-only | grep -v '^metadata/\S*\.yml$')
|
||||
- |
|
||||
if git diff --merge-base FETCH_HEAD HEAD --name-only | grep -v '^metadata/\S*\.yml$'; then
|
||||
printf "\x1b[31mERROR Modifications to paths checkupdates-bot is not allowed to change! \x1b[0m\n"
|
||||
exit 1
|
||||
else
|
||||
echo "All file modifications match paths checkupdates-bot is allowed to change."
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in a new issue