Use explicit version from antora.yml
This commit is contained in:
parent
caf4c47105
commit
e2c5772b3d
|
@ -1,5 +1,3 @@
|
||||||
name: ROOT
|
name: ROOT
|
||||||
title: Spring Security
|
version: 6.0
|
||||||
start_page: ROOT:index.adoc
|
prerelease: true
|
||||||
nav:
|
|
||||||
- modules/ROOT/nav.adoc
|
|
||||||
|
|
|
@ -2,12 +2,6 @@ apply plugin: 'io.spring.convention.docs'
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
tasks.register("generateAntora") {
|
tasks.register("generateAntora") {
|
||||||
group = "Documentation"
|
|
||||||
description = "Generates antora files"
|
|
||||||
dependsOn 'generateAntoraYml', 'generateAntoraComponentVersion'
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.register("generateAntoraYml") {
|
|
||||||
group = "Documentation"
|
group = "Documentation"
|
||||||
description = "Generates the antora.yml for dynamic properties"
|
description = "Generates the antora.yml for dynamic properties"
|
||||||
doLast {
|
doLast {
|
||||||
|
@ -30,7 +24,8 @@ tasks.register("generateAntoraYml") {
|
||||||
def outputFile = new File("$buildDir/generateAntora/antora.yml")
|
def outputFile = new File("$buildDir/generateAntora/antora.yml")
|
||||||
outputFile.getParentFile().mkdirs()
|
outputFile.getParentFile().mkdirs()
|
||||||
outputFile.createNewFile()
|
outputFile.createNewFile()
|
||||||
outputFile.setText("""name: ROOT
|
def antoraYmlText = file("antora.yml").getText()
|
||||||
|
outputFile.setText("""$antoraYmlText
|
||||||
title: Spring Security
|
title: Spring Security
|
||||||
start_page: ROOT:index.adoc
|
start_page: ROOT:index.adoc
|
||||||
asciidoc:
|
asciidoc:
|
||||||
|
@ -49,18 +44,6 @@ ${ymlVersions}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("generateAntoraComponentVersion") {
|
|
||||||
group = "Documentation"
|
|
||||||
description = "Generates the antora.component.version file"
|
|
||||||
doLast {
|
|
||||||
def outputFile = new File("$buildDir/generateAntora/antora.component.version")
|
|
||||||
outputFile.getParentFile().mkdirs()
|
|
||||||
outputFile.createNewFile()
|
|
||||||
def antoraVersion = project.version.replaceAll(/^(\d+\.\d+)\.\d+(-\w+)?$/, '$1')
|
|
||||||
outputFile.setText("$antoraVersion")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
Loading…
Reference in New Issue