每天一剂Rails良药之Continuous Integration

Rails有一个简单的持续集成插件:
ruby script/plugin install continuous_builder

不过这个插件是需要Subversion的
然后我们在repository/hooks目录下创建一个post-commit文件:
#!/bin/sh
[email protected]
BUILDER="'Continuous Builder' <[email protected]>"
BUILD_DIRECTORY=/path/to/build_directory
APP_NAME=MyApp
RAKE=/usr/local/bin/rake

cd $BUILD_DIRECTORY/my_app_under_sn && \
     $RAKE -t test_latest_revision NAME="$APP_NAME" \
                                   recipients="$developers" \
                                   SENDER="$BUILDER" &


这样每次提交代码都会运行RAKE -t test_latest_revision。。。并将结果以Email的方式report。
注意post-commit文件的权限为可读可执行

你可能感兴趣的:(Ruby,subversion,Rails)