antora.component.version extract major.minor only

This commit is contained in:
Rob Winch 2021-10-26 15:22:40 -05:00
parent 144af074b7
commit 9357c2f05d
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ tasks.register("generateAntoraComponentVersion") {
def outputFile = new File("$buildDir/generateAntora/antora.component.version")
outputFile.getParentFile().mkdirs()
outputFile.createNewFile()
def antoraVersion = project.version.replaceAll(/^(\d+\.\d+)\.\d+(-\w+)$/, '$1$2')
def antoraVersion = project.version.replaceAll(/^(\d+\.\d+)\.\d+(-\w+)?$/, '$1')
outputFile.setText("$antoraVersion")
}
}