开发人员有一个测试服务器,每次在svn改好代码后,commit 直接就可以上传到测试服务器
REPOS="$1" REV="$2" export LANG=en_US.UTF-8 CURDATE=`date` echo "Deployed by at $CURDATE" >> /tmp/automaticUpdate2.log for A in `svnlook dirs-changed /home/svn/projectname/` do /usr/bin/svn update /var/www/html/projectname/ --username mark --password dZwou=FB5m --no-auth-cache >> /tmp/automaticUpdate2.log done echo `whoami`,$REPOS,$REV >> /tmp/automaticUpdate2.log if [ $? == 0 ] then rsync -vzrtopg /var/www/html/projectname/trunk/ --progress --delete --exclude-from="/etc/rsyncd/exclude1" --password-file=/etc/rsyncd/password root@192.168.1.185::projectname/ fi
原文地址:http://wks97.blog.51cto.com/2139464/1619262