Skip to content

Instantly share code, notes, and snippets.

@tassoevan
Created August 8, 2015 16:58
Show Gist options
  • Save tassoevan/fd3dd6ab8ae3033d7dea to your computer and use it in GitHub Desktop.
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`
#!/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