diff --git a/Rakefile b/Rakefile index f1bf885be8..101a553ca8 100644 --- a/Rakefile +++ b/Rakefile @@ -142,6 +142,7 @@ task :update_version, :old, :new do |task, args| log_entries[:api] = log.select { |l| l =~ /\[API\]/ } log_entries[:dsl] = log.select { |l| l =~ /\[DSL\]/ } log_entries[:ext] = log.select { |l| l =~ /\[EXT\]/ } + log_entries[:xpack] = log.select { |l| l =~ /\[XPACK\]/ } changelog = File.read(File.open('CHANGELOG.md', 'r')) @@ -187,6 +188,15 @@ task :update_version, :old, :new do |task, args| changelog_update << "\n\n" end + unless log_entries[:xpack].empty? + changelog_update << "## XPACK:#{args[:new]}\n\n" + changelog_update << log_entries[:xpack] + .map { |l| l.gsub /\[XPACK\] /, '' } + .map { |l| "#{l}" } + .join("\n") + changelog_update << "\n\n" + end + File.open('CHANGELOG.md', 'w+') { |f| f.write changelog_update and f.write changelog } puts "\n\n", "= DIFF ".ansi(:faint) + ('='*93).ansi(:faint)