打开版本库根目录
增加tmp用来保存更新记录
进入hooks目录
复制post-commit.tmpl 文件,新文件名称为post-commit 不需要后缀。
打开文件,注释文件内所有内容,增加以下内容
export LANG=zh_CN.UTF-8
REPOS=”$1″
REV=”$2″

SVN_PATH=svn://172.246.164.41/yiicms
WEB_PATH=/www/web/yiicms/public_html
LOG_PATH=/www/svn/storage/tmp/svn_update.log

echo “\n\n\n########## start commit ” ` date “+%Y-%m-%d %H:%M:%S”` ‘##################’ >> $LOG_PATH
echo `whoami`,$REPOS,$REV >> $LOG_PATH
svn update /www/web/yiicms/public_html/
$SVN_PATH update –username dreamzml –password 421126 $WEB_PATH –no-auth-cache >> $LOG_PATH
chown -R www:www $WEB_PATH

#mailer.py commit “$REPOS” “$REV” /path/to/mailer.conf
来源:http://blog.csdn.net/dreamzml/article/details/12856965

同步

Comments are closed.

Post Navigation