svn钩子

Posted yang1010

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了svn钩子相关的知识,希望对你有一定的参考价值。

#!/bin/sh
#修改为服务编码
export.UTF-8

#Set variable
REPOS="$1"
REV="$2"

#svn安装脚本目录
SVN=/usr/bin/svn
#这里设置为你的网站的根目录
WEB=/www/web/music
#日志存放文件
LOG=/www/log/svnLog/first.txt

#update the code from the SVN
#demo是用户名 123456是密码
$SVN update $WEB --username carrot --password pwd666666 --non-interactive

chmod 755 -R $WEB
chown -R www.www $WEB

#......................
if [ $? == 0 ]
then

    echo  "$REPOS" "$REV" >> $LOG
    echo `date` >> $LOG
    echo "##############################" >> $LOG
fi

以上是关于svn钩子的主要内容,如果未能解决你的问题,请参考以下文章