Skip to content

Commit 966a345

Browse files
committed
change link to user guide to specific version
Signed-off-by: jinwoo22 <[email protected]>
1 parent 4f8405f commit 966a345

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

documentation/documentation.gradle.kts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,16 @@ tasks {
395395
externalModulesWithoutModularJavadoc.forEach { (moduleName, baseUrl) ->
396396
result = result.replace("${baseUrl}$moduleName/", baseUrl)
397397
}
398+
399+
val version = project.version.toString().replace("-SNAPSHOT", "")
400+
val localAntoraPath = layout.buildDirectory.dir("antora-site").get().asFile.toURI().resolve("$version").toString()
401+
val isReleaseBuild = System.getenv("CI") == "true"
402+
result = result.replace(
403+
"https://docs.junit.org/current",
404+
if (isReleaseBuild) "https://docs.junit.org/$version"
405+
else localAntoraPath
406+
)
407+
398408
return@filter result
399409
}
400410
}

0 commit comments

Comments
 (0)