#!/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) rsync to shebao@120.78.163.135:/usr/shanp/server/shebao-$1" rsync --delete -avz /srv/source/shebao-server/shebao-$1/build/deploy/ shebao@120.78.163.135:/usr/shanp/server/shebao-$1/lib/ echo " 4) shebao@120.78.163.135 shebao-$1/run.sh restart..." ssh -l shebao 120.78.163.135 "cd /usr/shanp/server/shebao-$1/; sh /usr/shanp/server/shebao-$1/run.sh restart" echo done! exit 0