antora.component.version extract major.minor only
This commit is contained in:
parent
144af074b7
commit
9357c2f05d
|
@ -56,7 +56,7 @@ tasks.register("generateAntoraComponentVersion") {
|
||||||
def outputFile = new File("$buildDir/generateAntora/antora.component.version")
|
def outputFile = new File("$buildDir/generateAntora/antora.component.version")
|
||||||
outputFile.getParentFile().mkdirs()
|
outputFile.getParentFile().mkdirs()
|
||||||
outputFile.createNewFile()
|
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")
|
outputFile.setText("$antoraVersion")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue