shebao-server-dev.sh 653 B

12345678910111213141516171819202122232425262728293031
  1. #!/bash/sh
  2. echo -e "\033[35m 0) into /srv/source/shebao-server --> switch branch ... \033[0m"
  3. cd /srv/source/shebao-server
  4. # git checkout dev
  5. echo -e "\033[35m 1) into /srv/source/shebao-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 shebao-$1..."
  12. #gradle eclipse
  13. gradle shebao-$1:deploy
  14. echo " 3) copy to /srv/server/shebao-server"
  15. cp -rf /srv/source/shebao-server/shebao-$1/build/deploy/* /srv/server/shebao-server/shebao-$1/lib/
  16. echo " 4) shebao-$1/run.sh restart..."
  17. cd /srv/server/shebao-server/shebao-$1/
  18. sh /srv/server/shebao-server/shebao-$1/run.sh restart
  19. echo done!
  20. exit 0