mirror of https://github.com/rails/rails
Change release_sumary task to work in first releases of the series
This commit is contained in:
parent
5a0230c67f
commit
3c6cfdf7ad
|
@ -136,16 +136,20 @@ namespace :changelog do
|
|||
end
|
||||
end
|
||||
|
||||
task :release_summary, [:base_release] do |_, args|
|
||||
task :release_summary, [:base_release, :release] do |_, args|
|
||||
release_regexp = args[:base_release] ? Regexp.escape(args[:base_release]) : /\d+\.\d+\.\d+/
|
||||
|
||||
puts release
|
||||
|
||||
FRAMEWORKS.each do |fw|
|
||||
puts "## #{FRAMEWORK_NAMES[fw]}"
|
||||
fname = File.join fw, "CHANGELOG.md"
|
||||
contents = File.readlines fname
|
||||
contents.shift
|
||||
changes = []
|
||||
until contents.first =~ /^## Rails #{release_regexp}.*$/
|
||||
until contents.first =~ /^## Rails #{release_regexp}.*$/ ||
|
||||
contents.first =~ /^Please check.*for previous changes\.$/ ||
|
||||
contents.empty?
|
||||
changes << contents.shift
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue