ci: Require maintainers for new packages
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8171>
This commit is contained in:
parent
0acec3c456
commit
a3e0b0db8d
1 changed files with 11 additions and 0 deletions
11
.ci/grep.sh
11
.ci/grep.sh
|
|
@ -129,6 +129,17 @@ if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
|
|||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disallow adding packages without a maintainer set
|
||||
NEW_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=A "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true)
|
||||
|
||||
if [ -n "$NEW_APKBUILDS" ]; then
|
||||
if [ -n "$(grep -L '^maintainer="[^"]\+"$' $NEW_APKBUILDS || true)" ]; then
|
||||
echo "ERROR: A new package does not have a maintainer set."
|
||||
grep --color=always -L '^maintainer="[^"]\+"$' $NEW_APKBUILDS
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
exit "$exit_code"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue