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'.
This commit is contained in:
+4
-1
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user