Skip to content

Commit 66dfe47

Browse files
committed
release: Fix AUR push to use filtered parent commit
AUR hook validates parent commits too. Use aur/master as parent for the filtered commit instead of HEAD, so the hook only sees clean history.
1 parent 0ee31c0 commit 66dfe47

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

release.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,11 @@ git tag "${new_tag}"
140140
echo ""
141141
echo "Pushing to origin and aur..."
142142
git push origin master
143-
# AUR rejects subdirectories (.github/). Create a filtered commit for AUR.
143+
# AUR rejects subdirectories (.github/). Create a filtered commit parented on
144+
# AUR's current master so the hook only sees clean commits.
144145
aur_tree=$(git ls-tree HEAD | grep -v '.github' | git mktree)
145-
aur_commit=$(git commit-tree "${aur_tree}" -p HEAD -m "Release ${new_tag}")
146+
aur_parent=$(git rev-parse aur/master)
147+
aur_commit=$(git commit-tree "${aur_tree}" -p "${aur_parent}" -m "Release ${new_tag}")
146148
git -c push.followTags=false push aur "${aur_commit}:refs/heads/master"
147149
git -c push.followTags=false push origin "${new_tag}"
148150

0 commit comments

Comments
 (0)