Created
August 30, 2014 16:01
-
-
Save bassettsj/f4cc881775f4beaee25c to your computer and use it in GitHub Desktop.
Git hooks to compile the assets to production
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 | |
echo | |
if [ -a .commit ] | |
then | |
rm .commit | |
grunt --base=$HOME/kalabox/www/greenbiz/sites/all/themes/greenbiz --gruntfile=$HOME/kalabox/www/greenbiz/sites/all/themes/greenbiz/Gruntfile.coffee | |
git add sites/all/themes/greenbiz/css | |
git add sites/all/themes/greenbiz/js/dist | |
git add sites/all/themes/greenbiz/styleguide | |
git commit --amend -C HEAD --no-verify | |
fi | |
exit |
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 | |
echo | |
touch .commit | |
exit |
Author
bassettsj
commented
Aug 30, 2014
- $GREENBIZ/.git/hooks/{WE GO HERE}
- chmod u+x .git/hooks/pre-commit
- chmod u+x .git/hooks/post-commit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment