Created
June 20, 2015 14:08
-
-
Save mrmorris/3e1c5087ed52303a9ea6 to your computer and use it in GitHub Desktop.
Dummy pore-receive hook
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
#!/bin/bash | |
# For each ref being updated | |
# If it is master (branch) | |
# Then... update our server? | |
while read oldrev newrev ref | |
do | |
if [[ $ref =~ .*/master$ ]]; | |
then | |
# this will echo back to the client | |
echo "Master triggered a deploy" | |
# this will write locally | |
echo "Deployed $newrev on $ref" > deploy.log | |
else | |
#this will echo back to the client | |
echo "Ref $ref received. Doing nothing. Only master will trigger and update." | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment