From 56a66cbd57a17973fb1ba7a4a4b9710803dfd787 Mon Sep 17 00:00:00 2001 From: "Greg L. Turnquist" Date: Wed, 28 Oct 2020 21:13:18 -0500 Subject: [PATCH] Support new versioning schema with Jenkins. --- Jenkinsfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ece9c07..480c9f5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -117,11 +117,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' }