These hooks are meant to be used in Git repositories that track PKGBUILD
files for the Arch User Repository. Place them in .git/hooks/pre-{commit|push}
and make sure they're executable.
This hook simply updates the .SRCINFO
before every commit by running:
makepkg --printsrcinfo > .SRCINFO
Disable by setting aur.hooks.srcinfo
to a falsy value:
git config --local aur.hooks.srcinfo no
This hook uses antergos/makepkg to
test building the package in a clean environment within a container. It tries
to use podman
or docker
.
WARNING: the Antergos project has been ended in May 2019 and the Docker image used in the script is over 2 years old now.
It clones the repository and checks out every commit that is pushed and different on the remote. Usually that should only be a single ref for AUR packages.
Disable by setting aur.hooks.makepkg
to a falsy value:
git config --local aur.hooks.makepkg no
To quickly apply these hooks to your repository run:
for file in pre-commit pre-push; do
curl -sL https://gist.github.com/ansemjo/fbffb97ac95bfacac904785d36fc81a8/raw/$file > .git/hooks/$file
chmod +x .git/hooks/$file
done
removing
-it
fixed it for me.