diff --git a/.ci/grep.sh b/.ci/grep.sh index 8f7fa53eb..ff94af044 100755 --- a/.ci/grep.sh +++ b/.ci/grep.sh @@ -121,14 +121,14 @@ if grep -qr '# Maintainer:' -- *; then fi if [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then - # Find all moved or new kernel APKBUILDs in main, community or testing - MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES=$(git show --pretty="" --name-only --diff-filter=AR "$CI_MERGE_REQUEST_DIFF_BASE_SHA"..HEAD | grep "device/\(main\|community\|testing\)/linux-.*/APKBUILD" || true) + # 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) - if [ -n "$MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES" ]; then - if [ -n "$(grep -L LLVM=1 $MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES || true)" ]; then - echo "ERROR: An added or moved close-to-mainline kernel package is not being built with LLVM." + if [ -n "$MODIFIED_MAINLINE_KERNEL_PACKAGES" ]; then + if [ -n "$(grep -L LLVM=1 $MODIFIED_MAINLINE_KERNEL_PACKAGES || true)" ]; then + echo "ERROR: A new or modified close-to-mainline kernel package is not being built with LLVM." echo "See https://postmarketos.org/edge/2025/11/11/kernels-llvm/ for more details" - grep --color=always -L LLVM=1 $MOVED_OR_NEW_MAINLINE_KERNEL_PACKAGES + grep --color=always -L LLVM=1 $MODIFIED_MAINLINE_KERNEL_PACKAGES exit_code=1 fi fi