Including developer notes as part of your cruisecontrol.rb task

So we can stay on top of our TODOs, FIXMEs and CHANGEs, we include the “notes” rake task output as one of the custom build artifacts. As I haven’t found a better way to pipe the output of invoked rake tasks, we redirect stdout into a file.

Add to your cruise.rake file:

orig_stdout = $stdout
$stdout = File.new('log/developer_notes.log', 'w+')
Rake::Task['notes'].invoke
$stdout = orig_stdout

And ensure that all .log files within the log/ directory are copied to the custom build artifacts by adding the following into your cruise_config.rb

Project.configure do |project|
  project.log_publisher.globs = ['log/*.log']
end
Advertisements

One Response to “Including developer notes as part of your cruisecontrol.rb task”

  1. Including developer notes as part of your cruisecontrol.rb task « Fringley's Blog Says:

    […] post: Including developer notes as part of your cruisecontrol.rb task. Tags cruisecontrol, developer notes, rake Categories […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: