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