#!/bash/sh echo -e "\033[35m 0) into /home/chensenlai/shanp/project/hr-saas --> switch branch ... \033[0m" cd /home/chensenlai/shanp/project/hr-saas git checkout ent-dev echo -e "\033[35m 1) into /home/chensenlai/shanp/project/hr-saas --> git pull ... \033[0m" git pull if test -z "$1" then exit 0 fi echo " 2) deploy project saas-$1..." #gradle eclipse gradle saas-$1:deploy echo " 3) rsync to spu@120.79.211.173:/srv/server/hr-saas" rsync --delete -avz /home/chensenlai/shanp/project/hr-saas/saas-$1/build/deploy/ spu@120.79.211.173:/srv/server/hr-saas/saas-$1/lib/ echo " 4) spu@120.79.211.173 saas-$1/run.sh restart..." ssh -l spu 120.79.211.173 "cd /srv/server/hr-saas/saas-$1/; sh /srv/server/hr-saas/saas-$1/run.sh restart" echo done! exit 0