aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'tasks')
-rw-r--r--tasks/release.rb15
-rw-r--r--tasks/release_announcement_draft.erb10
2 files changed, 17 insertions, 8 deletions
diff --git a/tasks/release.rb b/tasks/release.rb
index 1e83814bae..a13003aa27 100644
--- a/tasks/release.rb
+++ b/tasks/release.rb
@@ -122,15 +122,20 @@ namespace :changelog do
end
end
- task :release_summary do
- (FRAMEWORKS + ["guides"]).each do |fw|
- puts "## #{fw}"
+ task :release_summary, [:base_release] do |_, args|
+ release_regexp = args[:base_release] ? Regexp.escape(args[:base_release]) : /\d+\.\d+\.\d+/
+
+ FRAMEWORKS.each do |fw|
+ puts "## #{FRAMEWORK_NAMES[fw]}"
fname = File.join fw, "CHANGELOG.md"
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
+ until contents.first =~ /^## Rails #{release_regexp}.*$/
+ changes << contents.shift
+ end
+
+ puts changes.join
puts
end
end
diff --git a/tasks/release_announcement_draft.erb b/tasks/release_announcement_draft.erb
index 3dbb8c053f..4840d0b9e2 100644
--- a/tasks/release_announcement_draft.erb
+++ b/tasks/release_announcement_draft.erb
@@ -12,15 +12,19 @@ If you find one, please open an [issue on GitHub](https://github.com/rails/rails
## CHANGES since <%= version.previous %>
To view the changes for each gem, please read the changelogs on GitHub:
- <% FRAMEWORKS.sort.each do |framework| %>
+ <%- FRAMEWORKS.sort.each do |framework| -%>
<%= "* [#{FRAMEWORK_NAMES[framework]} CHANGELOG](https://github.com/rails/rails/blob/v#{version}/#{framework}/CHANGELOG.md)" %>
- <% end %>
+ <%- end -%>
+
+To see a summary of changes, please read the release on GitHub:
+
+<%= "[#{version} CHANGELOG](https://github.com/rails/rails/releases/tag/v#{version})" %>
*Full listing*
To see the full list of changes, [check out all the commits on
GitHub](https://github.com/rails/rails/compare/v<%= "#{version.previous}...v#{version}" %>).
- <% end %>
+<% end %>
## SHA-256
If you'd like to verify that your gem is the same as the one I've uploaded,