Created
November 26, 2012 18:57
-
-
Save jmoz/4149929 to your computer and use it in GitHub Desktop.
Git post-receive for jmoz.co.uk
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
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
echo Update to branch $branch | |
if [ "master" == "$branch" ]; then | |
echo "git checkout -f master branch!!!" | |
unset GIT_DIR | |
GIT_WORK_TREE=/home/web/sites/jmoz.co.uk git checkout -f | |
bash /home/web/sites/jmoz.co.uk/install.sh | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment