basepath=$(cd `dirname $0`; pwd) cd $basepath date > lastpushtime.log git add lastpushtime.log cd .. name=$( pwd|awk -F "/" '{print $NF}') micro=$name git add ** git commit -am "update" git push origin master --force tag=$(date +1.%Y%m%d.%H%M%S) echo $tag git tag -a v$tag -m "update" cat >/tmp/${name}.pre </tmp/${name}.after <> ./start.sh && zip -rq app.zip app && zip -rq app.zip start.sh && scp app.zip root@devops.ec2.gamemag.link:/app/gitlab/$micro/v$tag/app/app.zip && ssh root@devops.ec2.gamemag.link < /tmp/${name}.after