12345678910111213141516171819202122232425262728293031 |
- #!/bash/sh
- echo -e "\033[35m 0) into /srv/source/shebao-server --> switch branch ... \033[0m"
- cd /srv/source/shebao-server
- # git checkout dev
- echo -e "\033[35m 1) into /srv/source/shebao-server --> git pull ... \033[0m"
- # git pull
- if test -z "$1"
- then
- exit 0
- fi
- echo " 2) deploy project shebao-$1..."
- #gradle eclipse
- gradle shebao-$1:deploy
- echo " 3) copy to /srv/server/shebao-server"
- cp -rf /srv/source/shebao-server/shebao-$1/build/deploy/* /srv/server/shebao-server/shebao-$1/lib/
- echo " 4) shebao-$1/run.sh restart..."
- cd /srv/server/shebao-server/shebao-$1/
- sh /srv/server/shebao-server/shebao-$1/run.sh restart
- echo done!
- exit 0
|