Skip to content

Commit

Permalink
Teach cut_release about antora.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jun 29, 2020
1 parent c0402b7 commit 1e5c15e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks/cut_release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ namespace :cut_release do
end
end

def update_antora_yml(new_version)
antora_metadata = File.read('docs/antora.yml')

File.open('docs/antora.yml', 'w') do |f|
f << antora_metadata.sub(
'version: master',
"version: #{new_version}"
)
end
end

def new_version_changes
changelog = File.read('CHANGELOG.md')
_, _, new_changes, _older_changes = changelog.split(/^## .*$/, 4)
Expand All @@ -54,6 +65,7 @@ namespace :cut_release do

add_header_to_changelog(new_version)
create_release_notes(new_version)
update_antora_yml(new_version)

puts "Changed version from #{old_version} to #{new_version}."
end
Expand Down

0 comments on commit 1e5c15e

Please sign in to comment.