Guest User

Untitled

a guest
Oct 18th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. ayv_deploy_dir="/Users/${USER}/Sites/ayv/deploy"
  2.  
  3. make_soup()
  4. {
  5. current_branch=`git status | head -n 1 | awk '{print $4}'`
  6. echo "Pushing $current_branch to soup... (Press Ctrl-c to abort)"
  7. sleep 2
  8. git checkout soup
  9. git fetch upstream && git merge upstream/soup
  10. git merge $current_branch && git push upstream soup || git reset --hard
  11. git checkout $current_branch
  12. }
  13.  
  14. serve_soup()
  15. {
  16. if [ ! -d $ayv_deploy_dir ]; then
  17. echo "You need to clone the project to $ayv_deploy_dir."
  18. return
  19. fi
  20.  
  21. cd $ayv_deploy_dir
  22. git checkout soup
  23. git fetch origin && git merge origin/soup
  24. /bin/echo -n "Deploy with pipeline? [Y/n]: "
  25. read pipeline
  26.  
  27. deploy="deploy:staging"
  28.  
  29. case $pipeline in
  30. N*|n*)
  31. deploy="'deploy:staging[nopipeline]'"
  32. ;;
  33. esac
  34.  
  35. bundle exec rake "$deploy"
  36. }
Add Comment
Please, Sign In to add comment