diff --git a/Jenkinsfile b/Jenkinsfile index 7f442a8..f941691 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,7 +25,9 @@ pipeline { env.DEPLOY_BUILD = 'false' - def releaseMatch = branch =~ /^release\/(\d+\.\d+\.\d+)$/ + // A release branch supplies major.minor; Jenkins supplies the patch + // number so release/2.0 build 1 becomes 2.0.1-RELEASE. + def releaseMatch = branch =~ /^release\/(\d+\.\d+)$/ if (releaseMatch.matches()) { env.BUILD_VERSION = "${releaseMatch[0][1]}.${env.BUILD_NUMBER}-RELEASE" env.DEPLOY_BUILD = 'true'