#1389 - Properly parse new version format.

Original issue: #1388.
This commit is contained in:
Greg L. Turnquist
2020-10-29 10:26:33 -05:00
parent b43654e8b5
commit 631b4acdc6

12
Jenkinsfile vendored
View File

@@ -137,11 +137,13 @@ pipeline {
returnStdout: true
).trim()
RELEASE_TYPE = 'milestone' // .RC? or .M?
RELEASE_TYPE = 'snapshot'
if (PROJECT_VERSION.endsWith('SNAPSHOT')) {
if (PROJECT_VERSION.matches(/.*-RC[0-9]+$/) || PROJECT_VERSION.matches(/.*-M[0-9]+$/)) {
RELEASE_TYPE = "milestone"
} else if (PROJECT_VERSION.endsWith('SNAPSHOT')) {
RELEASE_TYPE = 'snapshot'
} else if (PROJECT_VERSION.endsWith('RELEASE')) {
} else if (PROJECT_VERSION.matches(/.*\.[0-9]+$/)) {
RELEASE_TYPE = 'release'
}
@@ -224,7 +226,7 @@ pipeline {
returnStdout: true
).trim()
if (PROJECT_VERSION.endsWith('RELEASE')) {
if (PROJECT_VERSION.matches(/.*\.[0-9]+$/)) {
unstash name: 'build_info'
sh "ci/promote-to-bintray.sh"
} else {
@@ -262,7 +264,7 @@ pipeline {
returnStdout: true
).trim()
if (PROJECT_VERSION.endsWith('RELEASE')) {
if (PROJECT_VERSION.matches(/.*\.[0-9]+$/)) {
unstash name: 'build_info'
sh "ci/sync-to-maven-central.sh"
} else {