Created
May 2, 2016 09:14
-
-
Save sixertoy/9be3d95f96351599b8f4d6332e5b2fbf to your computer and use it in GitHub Desktop.
GIT hook run tests before push
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ---------------------------------- | |
# | |
# pre-push hook running tests | |
# | |
git stash -q --keep-index | |
# NodeJS project | |
npm test | |
RESULT=$? | |
git stash pop -q | |
[ $RESULT -ne 0 ] && exit 1 | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment