Browse files

add task to generate release notes for the four relevant repos

  • Loading branch information...
1 parent 38a9839 commit 181b946ee355fbc08f6bd30303ac8f52355a37a1 @dchelimsky dchelimsky committed Jul 13, 2012
Showing with 25 additions and 0 deletions.
  1. +25 −0 Rakefile
View
25 Rakefile
@@ -194,6 +194,31 @@ task :relish, :version do |_, args|
run_command "rake relish['#{args[:version]}']", :except => ['rspec']
end
+desc "generate release notes from changelogs"
+task :release_notes, :target do |_, args|
+ target = args[:target] || 'blog'
+ ['rspec-core', 'rspec-expectations', 'rspec-mocks', 'rspec-rails'].each do |project|
+ lines = []
+ Dir.chdir("repos/#{project}") do
+ log = File.readlines("Changelog.md").map(&:chomp)
+ header = log.shift.split
+ lines << "### #{project}-#{header[1]}"
+ full_changelog_link = log.shift
+ if target == 'email'
+ lines << full_changelog_link[1..-2].gsub('](', ': ')
+ else
+ lines << full_changelog_link
+ end
+ while log.first !~ /^###/
+ lines << log.shift.chomp
+ end
+ lines << ""
+ lines << ""
+ end
+ puts lines.join("\n")
+ end
+end
+
namespace :doc do
desc "generate docs"
task :generate do

0 comments on commit 181b946

Please sign in to comment.