bore-server-dev.sh 766 B

12345678910111213141516171819202122232425262728
  1. #!/bash/sh
  2. echo -e "\033[35m 0) into /Users/xwz/IdeaProjects/bore-server --> switch branch ... \033[0m"
  3. cd /Users/xwz/IdeaProjects/bore-server
  4. #git checkout dev
  5. echo -e "\033[35m 1) into /Users/xwz/IdeaProjects/bore-server --> git pull ... \033[0m"
  6. #git pull
  7. if test -z "$1"
  8. then
  9. exit 0
  10. fi
  11. echo " 2) deploy project bore-$1..."
  12. #gradle eclipse
  13. gradle bore-$1:deploy
  14. echo " 3) rsync to spu@120.79.211.173:/srv/server/bore-server"
  15. rsync --delete -avz /Users/xwz/IdeaProjects/bore-server/bore-$1/build/deploy/ spu@120.79.211.173:/srv/server/bore-server/bore-$1/lib/
  16. echo " 4) spu@120.79.211.173 bore-$1/run.sh restart..."
  17. ssh -l spu 120.79.211.173 "cd /srv/server/bore-server/bore-$1/; sh /srv/server/bore-server/bore-$1/run.sh restart"
  18. echo done!
  19. exit 0