Last active
August 29, 2015 14:24
-
-
Save wowo/e8ff09a0f12d4d2b96f9 to your computer and use it in GitHub Desktop.
Basic pre-commit git hook
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/bash | |
exec < /dev/tty | |
phpunit | |
rc=$? | |
if [[ $rc != 0 ]] ; then | |
echo -n "It looks like some of your tests failed. " | |
exit $rc; | |
fi | |
phpcs -n --standard=PSR2 module/ | |
rc=$? | |
if [[ $rc != 0 ]] ; then | |
echo -n "It looks like you made some code style violations " | |
exit $rc; | |
fi | |
exit $rc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment