Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- git checkout soup
- 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"
- }
Add Comment
Please, Sign In to add comment