歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> SVN+網站服務器同步更新

SVN+網站服務器同步更新

日期:2017/3/1 14:02:35   编辑:關於Linux
SVN+網站服務器同步更新 增加tmp用來保存更新記錄 進入hooks目錄 復制post-commit.tmpl 文件,新文件名稱為post-commit 不需要後綴。 打開文件,注釋文件內所有內容,增加以下內容 [html] 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
Copyright © Linux教程網 All Rights Reserved