From 440cf8c475285004436bbdbab4191752b2be2796 Mon Sep 17 00:00:00 2001 From: agw Date: Tue, 1 Sep 2026 23:05:00 +0200 Subject: [PATCH] Push HEAD:master to the AUR rather than a branch name Cloning a package that does not exist on the AUR yet gives an empty repo whose initial branch follows the runner's init.defaultBranch, which is not guaranteed to be master. Verified against the real AUR remote: auth works, the empty clone yields a .git, and 'git diff --staged --quiet' correctly reports changes there - so the first publish commits instead of exiting early with 'nothing to push'. --- scripts/push-aur.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/push-aur.sh b/scripts/push-aur.sh index c7aa1ec..7f9a840 100755 --- a/scripts/push-aur.sh +++ b/scripts/push-aur.sh @@ -61,6 +61,9 @@ fi version="$(awk -F= '/^pkgver=/{v=$2} /^pkgrel=/{r=$2} END{print v"-"r}' PKGBUILD)" git commit -m "Update to ${version}" -git push -u origin master +# Push HEAD explicitly rather than a branch name: cloning a package that does +# not exist on the AUR yet yields an empty repo whose initial branch depends on +# the runner's init.defaultBranch, which may not be master. +git push -u origin HEAD:master echo ":: pushed ${PKGNAME} ${version} to the AUR"