Skip to content

Commit c7a50c4

Browse files
committed
Use explicit version from antora.yml
1 parent 11aa02c commit c7a50c4

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

docs/antora.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
name: ROOT
2-
title: Spring Security
3-
start_page: ROOT:index.adoc
4-
nav:
5-
- modules/ROOT/nav.adoc
2+
version: 5.6

docs/spring-security-docs.gradle

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@ apply plugin: 'io.spring.convention.docs'
22
apply plugin: 'java'
33

44
tasks.register("generateAntora") {
5-
group = "Documentation"
6-
description = "Generates antora files"
7-
dependsOn 'generateAntoraYml', 'generateAntoraComponentVersion'
8-
}
9-
10-
tasks.register("generateAntoraYml") {
115
group = "Documentation"
126
description = "Generates the antora.yml for dynamic properties"
137
doLast {
@@ -30,7 +24,8 @@ tasks.register("generateAntoraYml") {
3024
def outputFile = new File("$buildDir/generateAntora/antora.yml")
3125
outputFile.getParentFile().mkdirs()
3226
outputFile.createNewFile()
33-
outputFile.setText("""name: ROOT
27+
def antoraYmlText = file("antora.yml").getText()
28+
outputFile.setText("""$antoraYmlText
3429
title: Spring Security
3530
start_page: ROOT:index.adoc
3631
asciidoc:
@@ -49,18 +44,6 @@ ${ymlVersions}
4944
}
5045
}
5146

52-
tasks.register("generateAntoraComponentVersion") {
53-
group = "Documentation"
54-
description = "Generates the antora.component.version file"
55-
doLast {
56-
def outputFile = new File("$buildDir/generateAntora/antora.component.version")
57-
outputFile.getParentFile().mkdirs()
58-
outputFile.createNewFile()
59-
def antoraVersion = project.version.replaceAll(/^(\d+\.\d+)\.\d+(-\w+)?$/, '$1')
60-
outputFile.setText("$antoraVersion")
61-
}
62-
}
63-
6447

6548

6649
dependencies {

0 commit comments

Comments
 (0)