#!/bin/bash echo -e "\033[35m 1) git pull... \033[0m" cd /srv/source/shebao-server #git pull #git checkout dev #git pull echo -e "\033[35m 2) deploy project shebao-$1... \033[0m" #gradle eclipse gradle shebao-$1:deploy echo -e "\033[35m 3) rsync to shebao@120.78.163.135:/usr/server/shebao-$1/lib/ \033[0m" rsync --delete -avz /srv/source/shebao-server/shebao-$1/build/deploy/ shebao@120.78.163.135:/usr/server/shebao-$1/lib/ echo -e "\033[35m 4) remote shebao-$1 restart... \033[0m" ssh shebao@120.78.163.135 > /dev/null 2>&1 << eenndd cd /usr/server/shebao-$1 sh run.sh restart exit eenndd echo done! exit 0