Skip to content

Commit 6a5e3e5

Browse files
rwinchgregturn
authored andcommitted
Add 3.2.0-M2.
The older tag is in a different start path and does not generate the antora.yml file correctly. This commit adds the older tag with a different start_path and a version-fix extension to ensure the version is added correctly. See #3095
1 parent 32e0a05 commit 6a5e3e5

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

antora-playbook.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ antora:
44
- require: '@springio/antora-extensions/latest-version-extension'
55
- require: '@springio/antora-extensions/inject-collector-cache-config-extension'
66
- '@antora/collector-extension'
7+
- './antora/lib/version-fix.js'
78
- '@antora/atlas-extension'
89
- require: '@springio/antora-extensions/root-component-extension'
910
root_component_name: 'data-jpa'
@@ -21,6 +22,10 @@ content:
2122
branches: [ main,'({3..9}).+({0..9}).x', '!(3.{0..1}.x)' ]
2223
tags: [ '({3..9}).+({0..9}).+({0..9})?(-{RC,M}+({0..9}))', '!(3.{0..1}.+({0..9})?(-{RC,M}+({0..9})))','!(3.2.0-M1)','!(3.2.0-M2)' ]
2324
start_path: spring-data-jpa/src/main/antora
25+
- url: https://github.com/spring-projects/spring-data-jpa
26+
branches: []
27+
tags: [ '3.2.0-M2' ]
28+
start_path: src/main/antora
2429
asciidoc:
2530
attributes:
2631
page-stackoverflow-url: https://stackoverflow.com/tags/spring-data-jpa

antora/lib/version-fix.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict'
2+
3+
/**
4+
* The purpose of this extension is to fix invalid metadata saved to either antora.yml or gradle.properties in certain
5+
* tags. This invalid metadata prevents Antora from classifying the component versions properly.
6+
*
7+
* This extension should be listed directly after @antora/collector-extension.
8+
*/
9+
module.exports.register = function () {
10+
this.once('contentAggregated', ({ contentAggregate }) => {
11+
contentAggregate.forEach((componentVersionBucket) => {
12+
if (componentVersionBucket.version === '3.2.0-SNAPSHOT') {
13+
componentVersionBucket.version = '3.2.0'
14+
componentVersionBucket.prerelease = '-SNAPSHOT'
15+
}
16+
})
17+
})
18+
}

0 commit comments

Comments
 (0)