Skip to content

Instantly share code, notes, and snippets.

@kasei
Created February 17, 2016 20:51
Show Gist options
  • Save kasei/0819f25cee79b3597576 to your computer and use it in GitHub Desktop.
Save kasei/0819f25cee79b3597576 to your computer and use it in GitHub Desktop.
Git pre-push hook for running the Attean test suite
#!/bin/sh
perl Makefile.PL && make
if prove -l t/ xt/
then
exit 0
else
echo '*** Test suite failed; not committing'
exit 1
fi
@kasei
Copy link
Author

kasei commented Feb 17, 2016

Save this as attean/.git/hooks/pre-push and make it executable chmod 755 attean/.git/hooks/pre-push and it will prevent you from pushing to github if the test suite isn't passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment