Skip to content

Instantly share code, notes, and snippets.

@shavit shavit/post-receive

Created Jan 11, 2016
What would you like to do?
Git deployment for Go Revel application
# /<REPOS-PATH>/<REPO-NAME>.git/hooks/post-receive
echo "---> An Error Has Occurred!"
echo "---> Receiving push as $USER"
git --work-tree=/<APP-PATH> --git-dir=/<REPOS-PATH>/<REPO-NAME>.git checkout -f
echo "---> Changing directory to the application path"
cd ${APP_PATH}
echo "---> Restarting"
exec restart <APP-NAME>
echo "---> Done"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.