diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-18 14:43:24 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-18 14:44:12 -0700 |
commit | 64e2a549cf92f25026a85575940a722492310125 (patch) | |
tree | ce0bf78672e5b3137929fbb9f5750e7f7896dcae /tasks | |
parent | 0acc6bd6cb1d27fdbb0c00ac3a322bc8413e03cc (diff) | |
download | rails-64e2a549cf92f25026a85575940a722492310125.tar.gz rails-64e2a549cf92f25026a85575940a722492310125.tar.bz2 rails-64e2a549cf92f25026a85575940a722492310125.zip |
adding a rake task to help generate changelog notes for release announcements
Diffstat (limited to 'tasks')
-rw-r--r-- | tasks/release.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tasks/release.rb b/tasks/release.rb index a605fed160..01950b227d 100644 --- a/tasks/release.rb +++ b/tasks/release.rb @@ -61,6 +61,32 @@ directory "dist" end end +namespace :changelog do + task :release_date do + FRAMEWORKS.each do |fw| + require 'date' + replace = '\1(' + Date.today.strftime('%B %d, %Y') + ')' + fname = File.join fw, 'CHANGELOG' + + contents = File.read(fname).sub(/^([^(]*)\(unreleased\)/, replace) + File.open(fname, 'wb') { |f| f.write contents } + end + end + + task :release_summary do + FRAMEWORKS.each do |fw| + puts "## #{fw}" + fname = File.join fw, 'CHANGELOG' + contents = File.readlines fname + contents.shift + changes = [] + changes << contents.shift until contents.first =~ /^\*Rails \d+\.\d+\.\d+/ + puts changes.reject { |change| change.strip.empty? }.join + puts + end + end +end + namespace :all do task :build => FRAMEWORKS.map { |f| "#{f}:build" } + ['rails:build'] task :install => FRAMEWORKS.map { |f| "#{f}:install" } + ['rails:install'] |