Created
December 3, 2013 18:34
-
-
Save arlando/7774834 to your computer and use it in GitHub Desktop.
a pre-push hook that calls grunt build when pushing to master for mac osx bash
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/sh | |
PATH="/usr/local/bin:/usr/local/share/npm/bin/grunt:$PATH" | |
echo "Running Pre-Push Hook..." | |
#check to see if we are on the heavenly master branch | |
if [ "`git branch | grep \* | cut -f2 -d' '`" == "master" ] | |
then | |
echo "Push to master branch ... building dist... pushing to website" | |
#force repo to build then push the sucka to master | |
grunt build | |
say -v Alex "Push was successful!" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment