From a7639afa5dc9e59e780a40b83815b6ba361c2dcb Mon Sep 17 00:00:00 2001 From: Issy Long Date: Sun, 11 Feb 2024 18:16:51 +0000 Subject: [PATCH] Better matching Co-authored-by: Bo Anderson --- .github/workflows/check-reference.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-reference.yml b/.github/workflows/check-reference.yml index 6b371fb9..4c54deab 100644 --- a/.github/workflows/check-reference.yml +++ b/.github/workflows/check-reference.yml @@ -25,12 +25,12 @@ jobs: run: | #!/bin/bash - core_patches=$(git -C homebrew-core grep -h "Homebrew/formula-patches" | awk -F/ '{print $NF}' | tr -d '"') + core_patches=$(git -C homebrew-core grep -h "Homebrew/formula-patches" | awk -F/ '{print $(NF-1)"/"$NF}' | tr -d '"') all_patches=$(git ls-files -- '*/*' ':^.*/*') status=0 for patch in $all_patches; do - if ! grep -q "$core_patches" <<< "$patch"; then + if ! grep -qx "$core_patches" <<< "$patch"; then echo "Unused patch: $patch." # TODO: Delete the patch and commit the deletion. status=1