ci: grep: always run nonfree-firmware check
Changes the nonfree-firmware check to check all APKBUILDs outside of 'archived' to align better with the other checks. This is now possible now that no package uses the old nonfree-firmware logic outside of 'archived'. Signed-off-by: Aster Boese <asterboese@mailbox.org> Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9086>
This commit is contained in:
parent
326db8aaa5
commit
0715fcdb82
1 changed files with 8 additions and 12 deletions
20
.ci/grep.sh
20
.ci/grep.sh
|
|
@ -135,6 +135,14 @@ if grep -qr '# Contributor:' --exclude-dir='docs' -- *; then
|
|||
exit_code=1
|
||||
fi
|
||||
|
||||
# Disallow non-free firmware subpackages
|
||||
if grep -qr 'pkgname-nonfree-firmware' --exclude-dir='archived' -- *; then
|
||||
echo "ERROR: Please remove the nonfree-firmware subpackage(s) and move the firmware to depends in the following APKBUILDs."
|
||||
echo "See https://docs.postmarketos.org/pmaports/main/packaging/firmware-packages.html"
|
||||
grep --color=always -r 'pkgname-nonfree-firmware' --exclude-dir='archived' -- *
|
||||
exit_code=1
|
||||
fi
|
||||
|
||||
if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
|
||||
# Find all added, modified or renamed kernel APKBUILDs in main, community or testing
|
||||
MODIFIED_MAINLINE_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\)/linux-.*/APKBUILD" || true)
|
||||
|
|
@ -187,18 +195,6 @@ if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Disallow non-free firmware subpackages
|
||||
CHANGED_APKBUILDS=$(git show --pretty="" --name-only --diff-filter=AMR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep APKBUILD || true)
|
||||
|
||||
if [ -n "$CHANGED_APKBUILDS" ]; then
|
||||
if [ -n "$(grep -r 'pkgname-nonfree-firmware' $CHANGED_APKBUILDS || true)" ]; then
|
||||
echo "ERROR: Please remove the nonfree-firmware subpackage(s) and move the firmware to depends in the following APKBUILDs."
|
||||
echo "See https://docs.postmarketos.org/pmaports/main/packaging/firmware-packages.html"
|
||||
grep --color=always -l 'pkgname-nonfree-firmware' $CHANGED_APKBUILDS
|
||||
exit_code=1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get latest commit message in MR
|
||||
case "$CI_COMMIT_DESCRIPTION" in
|
||||
*"[ci:skip-grep]"*)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue