This commit is contained in:
2026-01-30 19:26:37 +03:00
parent 8fab6be3d2
commit 9159d45435

14
Jenkinsfile vendored
View File

@ -27,14 +27,14 @@ pipeline {
versionText += it.trim();
}
echo versionText
def matcher = versionText =~ /version=(.*)(-[A-z]*)?/
echo matcher.group()
if (matcher) {
env.VERSION = matcher[0][1]
println "Extracted VERSION: ${env.VERSION}"
} else {
error "Failed to extract version from ${versionFile}"
def matcher = versionText =~ /^version=((\d+\.)*\d+)(?:-([A-Za-z]+))?$/
if (!matcher.matches()) {
error "Invalid version format: ${versionText}"
}
env.VERSION = matcher[0][1]
echo "Extracted VERSION: ${env.VERSION}"
}
}
}