以项目example为例,进入hooks目录:
cd /www/svn/example
复制post-commit.tmpl文件:
cp post-commit.tmpl post-commit
修改post-commit文件的内容:
#!/bin/sh export LANG=zh_CN.UTF-8 /usr/bin/svn update --username moxuan --password moxuan123 /www/wwwroot/example_com
设置post-commit文件的可执行权限:
chmod 755 post-commit
进入项目目录/www/wwwroot/example_com, checkout项目:
svn checkout svn://localhost:3690/example . # 更新: svn update
yii初始化:
/usr/bin/php init /usr/bin/php yii migrate