#获取最后一个版本的更新日志
workspace2=/testtemp
logdir=/testtmp
rm -rf ${logdir}/change.log
git diff --stat $GIT_PREVIOUS_SUCCESSFUL_COMMIT $GIT_COMMIT --name-only >> ${logdir}/change.log
touch ${workspace2}/change.log
sh /home/test.sh ${logdir} ${workspace2}
#获取指定版本的更新日志
workspace2=/testtemp
logdir=/testtmp
rm -rf ${logdir}/change.log
git diff ce1ae64 36318bf --stat $GIT_PREVIOUS_SUCCESSFUL_COMMIT $GIT_COMMIT --name-only >> ${logdir}/change.log
touch ${workspace2}/change.log
#获取指定版本的更新日志,并打包
git diff ce1ae64 36318bf --name-only | xargs zip /testtmp/update.zip
#获取指定版本的更新日志,并同步到其他终端
cd /testtemp
rm -rf *
git diff ce1ae64 36318bf --name-only | xargs zip /testtmp/update.zip
cd /testtmp
unzip update.zip -d /testtemp
chown -R apache:users /testtemp
sudo rsync -zavP --exclude=/.git/ --exclude=wos/hrs130/web/index.php --exclude=wos/hrs130/config/main-local.php --password-file=/usr/local/rsync/rsync.scrt /testtemp/ apache@10.10.18.130::apache/test/