spring-security/lib/antora/extensions/version-fix.js

23 lines
960 B
JavaScript
Raw Normal View History

2022-08-30 17:58:27 -04:00
'use strict'
2022-10-24 20:26:56 -04:00
module.exports.register = function () {
this.once('contentAggregated', ({ contentAggregate }) => {
contentAggregate.forEach((componentVersionBucket) => {
if (componentVersionBucket.prerelease === 'true') componentVersionBucket.prerelease = true
if (!componentVersionBucket.name && componentVersionBucket.displayVersion === 5.6) {
2022-10-24 20:26:56 -04:00
componentVersionBucket.name = 'ROOT'
componentVersionBucket.version = '5.6.0-RC1'
delete componentVersionBucket.displayVersion
componentVersionBucket.prerelease = true
}
else if (componentVersionBucket.version === '5.6.1') {
delete componentVersionBucket.prerelease
}
else if (typeof componentVersionBucket.prerelease === 'string' && componentVersionBucket.prerelease !== '-SNAPSHOT') {
componentVersionBucket.version += componentVersionBucket.prerelease
componentVersionBucket.prerelease = true
}
2022-08-30 17:58:27 -04:00
})
2022-10-24 20:26:56 -04:00
})
2022-08-30 17:58:27 -04:00
}