Skip to content

Commit

Permalink
Use version without patch in antora's config
Browse files Browse the repository at this point in the history
  • Loading branch information
koic committed Jun 29, 2020
1 parent 1e5c15e commit 34499a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: rubocop-performance
title: RuboCop Performance
# We always provide version without patch here (e.g. 1.1),
# as patch versions should not appear in the docs.
version: master
nav:
- modules/ROOT/nav.adoc
6 changes: 5 additions & 1 deletion tasks/cut_release.rake
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ namespace :cut_release do
File.open('docs/antora.yml', 'w') do |f|
f << antora_metadata.sub(
'version: master',
"version: #{new_version}"
"version: #{version_sans_patch(new_version)}"
)
end
end

def version_sans_patch(version)
version.split('.').take(2).join('.')
end

def new_version_changes
changelog = File.read('CHANGELOG.md')
_, _, new_changes, _older_changes = changelog.split(/^## .*$/, 4)
Expand Down

0 comments on commit 34499a1

Please sign in to comment.