Fix version parsing

This commit is contained in:
Claude Brisson
2024-03-15 20:20:23 +01:00
parent bb3ce065e8
commit 93332d6726

View File

@@ -125,7 +125,7 @@ private fun extractWarFiles() {
val webappsFolderURL = getResource("/META-INF/webapps") ?: throw Error("webapps not found")
val jarConnection = webappsFolderURL.openConnection() as JarURLConnection
val jarFile: JarFile = jarConnection.jarFile
val extractVersion = Regex(".*?-(\\d+\\.\\d+(?:-[^.-]+)?).war")
val extractVersion = Regex(".*?-(\\d+\\.\\d+(?:\\.\\d+)?(?:-[^.-]+)?).war")
var version: String? = null
jarFile.entries().toList().filter { entry ->
entry.name.startsWith(jarConnection.entryName)