This commit is contained in:
2026-01-30 18:39:01 +03:00
parent c1567f138d
commit 37971727e3

12
Jenkinsfile vendored
View File

@ -19,18 +19,18 @@ pipeline {
steps {
script {
def versionFile = "src/main/resources/META-INF/ncore-product/${env.PRODUCT_GROUP}/version.properties"
if (!(versionFile.exists()))
error "Version file not found: ${versionFile}"
if (!fileExists(versionFile))
error "Version file not found: ${versionFile}"
def versionText = ""
readFile(file: versionFile).readLines().forEach {
versionText += it.concat("\n");
versionText += it.concat("\n");
}
def matcher = versionText =~ /version=(.*)(-[A-z]*)?/
if (matcher) {
env.VERSION = matcher[0][1]
println "Extracted VERSION: ${env.VERSION}"
env.VERSION = matcher[0][1]
println "Extracted VERSION: ${env.VERSION}"
} else {
error "Failed to extract version from ${versionFile}"
error "Failed to extract version from ${versionFile}"
}
}
}