Created
August 8, 2015 16:58
-
-
Save tassoevan/fd3dd6ab8ae3033d7dea to your computer and use it in GitHub Desktop.
Git hook to send Sculpin generated files to production server on `git checkout master`
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/bash | |
checkoutType=$3 | |
[[ "$checkoutType" == 1 ]] || exit | |
branch=`git symbolic-ref --short HEAD` | |
if [[ "$branch" == "master" ]]; then | |
sculpin generate --env=prod | |
rsync --archive --delete --progress output_prod/ myuser@myserver:mypath/ | |
rm -rf output_prod/ | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment