From 34499a1f5257b5639465c682d1c33e41b03d7dc0 Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Mon, 29 Jun 2020 21:49:23 +0900 Subject: [PATCH] Use version without patch in antora's config Follow up to https://github.com/rubocop-hq/rubocop/commit/699e748. --- docs/antora.yml | 2 ++ tasks/cut_release.rake | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/antora.yml b/docs/antora.yml index a8d38a4443..8029079a95 100644 --- a/docs/antora.yml +++ b/docs/antora.yml @@ -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 diff --git a/tasks/cut_release.rake b/tasks/cut_release.rake index 97d9bfea96..48a4947662 100644 --- a/tasks/cut_release.rake +++ b/tasks/cut_release.rake @@ -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)