Created
May 23, 2012 18:32
-
-
Save pgib/2776901 to your computer and use it in GitHub Desktop.
Put this soup in your .bash_profile and smoke (or slurp) it!
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
ayv_deploy_dir="/Users/${USER}/Sites/ayv/deploy" | |
make_soup() | |
{ | |
current_branch=`git status | head -n 1 | awk '{print $4}'` | |
echo "Pushing $current_branch to soup... (Press Ctrl-c to abort)" | |
sleep 2 | |
git checkout soup | |
git fetch upstream && git merge upstream/soup | |
git merge $current_branch && git push upstream soup || git reset --hard | |
git checkout $current_branch | |
} | |
serve_soup() | |
{ | |
if [ ! -d $ayv_deploy_dir ]; then | |
echo "You need to clone the project to $ayv_deploy_dir." | |
return | |
fi | |
cd $ayv_deploy_dir | |
current_branch=`git branch|grep \*|awk '{ print $2 }'` | |
if [ $current_branch != "soup" ]; then | |
git checkout soup | |
fi | |
git fetch origin && git merge origin/soup | |
/bin/echo -n "Deploy with pipeline? [Y/n]: " | |
read pipeline | |
deploy="deploy:staging" | |
case $pipeline in | |
N*|n*) | |
deploy="'deploy:staging[nopipeline]'" | |
;; | |
esac | |
bundle exec rake "$deploy" | |
} |
shouldn't it be:
git push upstream soup (on line 8)
fixed
maybe add
echo "checking out soup in $ayv_deploy_dir"
after line 21.
Or only checkout soup if necessary. Grab the update while it's still hot!
Can you add instructions for creating the deploy repo again... I lost/broke mine
soup is now staging! Mmmmmmmm staging.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"git push soup upstream" should be "git push upstream soup", no?