Skip to content

Commit

Permalink
Delete the unused patches and push the commits to a branch
Browse files Browse the repository at this point in the history
- Let's see how this goes.
  • Loading branch information
issyl0 committed Feb 11, 2024
1 parent a7639af commit fb4662f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/check-reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ jobs:
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
git checkout -b remove-unused-patches
for patch in $all_patches; do
if ! grep -qx "$core_patches" <<< "$patch"; then
echo "Unused patch: $patch."
# TODO: Delete the patch and commit the deletion.
status=1
echo "Unused patch: $patch; deleting."
git rm "$patch"
git commit -m "Remove unused patch: $patch"
fi
done
exit $status
git push origin remove-unused-patches

0 comments on commit fb4662f

Please sign in to comment.