Last active
August 29, 2015 14:21
-
-
Save fernandospr/6c0b8970cfc6f087a878 to your computer and use it in GitHub Desktop.
Git pre push script (.git/hooks/pre-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 | |
CMD="mvn test" # Run the tests before pushing | |
$CMD | |
RESULT=$? | |
if [ $RESULT -ne 0 ]; then | |
echo "Failed $CMD" | |
exit 1 | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment