I'm looking to build and publish a latex document every time I advance the tip of a specific branch.
I'm looking at what hook I should be putting my build script and which conditions I need to check for.
I'm looking to build and publish a latex document every time I advance the tip of a specific branch.
I'm looking at what hook I should be putting my build script and which conditions I need to check for.
If changes are coming in via a push
to a remote, then on the remote server you'll want to use the post-receive
hook (though if you use pre-receive
then you can reject the push if, say, latex fails).
If you're using your local repository you should use post-commit
(or pre-commit
if you want to be able to reject the commit).
The hooks are documented in the git hooks man page.
Probably a little late... but you can find out which branch was committed to by using
if [ `git rev-parse --abbrev-ref HEAD` == "master" ]
in you script when you checked out the branch to commit in it.