Created
January 23, 2014 09:32
-
-
Save undoZen/8575631 to your computer and use it in GitHub Desktop.
post-commit
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 | |
unset GIT_DIR | |
git stash | grep -q 'No local changes' | |
RETVAL=$? | |
grunt | |
git add -A public/ | |
git commit -m '[post-commit] static files generated by grunt' | |
[ $RETVAL -ne 0 ] && git stash pop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment