Created
July 15, 2016 09:17
-
-
Save Bigomby/5949dc08e5b7067f2d00a959c5e556e5 to your computer and use it in GitHub Desktop.
Pre commit hook to verify an app pass tests
This file contains 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/sh | |
# stash any unstaged changes | |
git stash -q --keep-index | |
# run the tests | |
make tests | |
# store the last exit code in a variable | |
RESULT=$? | |
# unstash the unstashed changes | |
git stash pop -q | |
# return the exit code | |
exit $RESULT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment