Skip to content

Instantly share code, notes, and snippets.

@killercup
Created September 8, 2013 13:32
Show Gist options
  • Save killercup/6484725 to your computer and use it in GitHub Desktop.
Save killercup/6484725 to your computer and use it in GitHub Desktop.
ATRIC Post Receive Hook <https://github.com/killercup/atric>
#! /bin/csh
echo "Got your commits, begin precompiling assets..."
#echo '---' >> /home/app/hooks.log
setenv GIT_DIR /home/app/atric/.git
cd /home/app/atric/
git pull > /dev/null
git log --pretty=format:'%h%d %s\n' --abbrev-commit --date=relative -n 1
npm install > /dev/null && echo 'npm done.'
cd client
bower install > /dev/null && echo 'bower done.'
cd ..
grunt precompile > /dev/null && echo 'grunt done.'
echo "Successfully precompiled your new stuff. Restart server if needed."
#printf "%s post-received\n" `date +'%d.%m.%y-%H:%M:%S'`
unset GIT_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment