ソースを参照

Use explicit version from antora.yml

Rob Winch 3 年 前
コミット
c7a50c40ae
2 ファイル変更3 行追加23 行削除
  1. 1 4
      docs/antora.yml
  2. 2 19
      docs/spring-security-docs.gradle

+ 1 - 4
docs/antora.yml

@@ -1,5 +1,2 @@
 name: ROOT
-title: Spring Security
-start_page: ROOT:index.adoc
-nav:
-- modules/ROOT/nav.adoc
+version: 5.6

+ 2 - 19
docs/spring-security-docs.gradle

@@ -2,12 +2,6 @@ apply plugin: 'io.spring.convention.docs'
 apply plugin: 'java'
 
 tasks.register("generateAntora") {
-	group = "Documentation"
-	description = "Generates antora files"
-	dependsOn 'generateAntoraYml', 'generateAntoraComponentVersion'
-}
-
-tasks.register("generateAntoraYml") {
 	group = "Documentation"
 	description = "Generates the antora.yml for dynamic properties"
 	doLast {
@@ -30,7 +24,8 @@ tasks.register("generateAntoraYml") {
 		def outputFile = new File("$buildDir/generateAntora/antora.yml")
 		outputFile.getParentFile().mkdirs()
 		outputFile.createNewFile()
-		outputFile.setText("""name: ROOT
+		def antoraYmlText = file("antora.yml").getText()
+		outputFile.setText("""$antoraYmlText
 title: Spring Security
 start_page: ROOT:index.adoc
 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 {