public
Description: A set of rake tasks to help with checking in code
Homepage:
Clone URL: git://github.com/pgr0ss/rake_commit_tasks.git
pgr0ss (author)
Thu Feb 19 22:03:21 -0800 2009
commit  693687fa92c92e6f15fc03a2fc1b8cca498c1175
tree    580d276bdc93a5b2d548591e22361969a6ab5365
parent  7c012b8024a8689bbd17f634745f1e375cf58b2a
name age message
file .gitignore Wed Jun 18 13:38:04 -0700 2008 Ignore .svn folders [pgr0ss]
file CHANGES Wed Jun 18 13:40:41 -0700 2008 Added a svn:revert_all task which reverts all m... [pgr0ss]
file README.rdoc Loading commit data...
file Rakefile
directory lib/ Sun Jul 13 20:12:06 -0700 2008 Moved classes to lib folder [pgr0ss]
directory tasks/
directory test/

rake_commit_tasks

This plugin contains a set of rake tasks for checking your project into subversion. The most important is:

  rake commit

which:

  1. Prompts for a commit message
  2. Adds new files to subversion
  3. Deletes missing files from subversion
  4. svn update
  5. Runs the default rake task (which should run your tests)
  6. Displays svn status
  7. Checks cruisecontrol.rb to see if the build is passing
  8. Checks in the code

The first version started with the code posted at Jay Field’s Blog: blog.jayfields.com/2006/12/ruby-rake-commit.html Improvements have been added in from several more projects.

Installation

  git clone git://github.com/pgr0ss/rake_commit_tasks.git vendor/plugins/rake_commit_tasks
  rake commit

Customization

Preventing checkins on broken builds

If you want the build to check your cruisecontrol.rb instance and prompt you before checking in on a broken build, set CCRB_RSS to the location of the RSS feed.

For example, in your Rakefile:

  CCRB_RSS = 'http://example.com:3333/projects.rss'

Automatically merging from branch to trunk

If you want the build to automatically merge changes to the trunk when checking in on the branch, set PATH_TO_TRUNK_WORKING_COPY to the location of the checked out trunk working copy.

For example, in your Rakefile:

  PATH_TO_TRUNK_WORKING_COPY = "/Users/someone/my_project_trunk"

Now, if you have a branch checked out into /Users/someone/my_project_1.1 and you do a rake commit, the checkin will be merged into the trunk after the change is committed to the branch. Then, you can "cd /Users/someone/my_project_trunk" and check in the merged changes in the trunk. This behavior is described in more depth at www.pgrs.net/2007/10/16/automatically-merge-changes-from-branch-to-trunk