Created
February 19, 2013 12:55
-
-
Save michal/4985632 to your computer and use it in GitHub Desktop.
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 | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [ "master" == "$branch" ]; then | |
git --work-tree=/home/huncwot/domains/reserved-ecomerce-master/current checkout -f $branch | |
package="/home/huncwot/domains/reserved-ecomerce-master/current/packages/${newrev}.zip" | |
git archive --format=zip HEAD skin templates > $package | |
target="/home/huncwot/domains/reserved-ecomerce-master/current/packages/${newrev}-${oldrev}.txt" | |
git diff $oldrev $newrev -- templates > $target | |
echo "Changes pushed to ${branch}" | |
fi | |
if [ "staging" == "$branch" ]; then | |
git --work-tree=/home/huncwot/domains/reserved-ecomerce-master/staging checkout -f $branch | |
echo "Changes pushed to ${branch}" | |
fi | |
if [ "feature" == "$branch" ]; then | |
git --work-tree=/home/huncwot/domains/reserved-ecomerce-master/feature checkout -f $branch | |
echo "Changes pushed to ${branch}" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment