Skip to content

Commit daa4d93

Browse files
committed
update jenkins file for new version format release/X.Y.Z
1 parent 5d4d7ee commit daa4d93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jenkins/JenkinsFile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ def do_publish = params.publish_pypi
3838
@NonCPS
3939
boolean setDisplayVersion(publish) {
4040
branch_sanitized = branch.replaceAll('-', '.').replaceAll('_', '.').replaceAll('%2F', '-')
41-
def matcher = Pattern.compile("^release%2F([0-9]+)\\.([0-9]+)\$").matcher(branch)
41+
def matcher = Pattern.compile("^release%2F([0-9]+)\\.([0-9]+)\\.([0-9]+)\$").matcher(branch)
4242
if (matcher.matches()) {
4343
build_number = "dev${env.BUILD_NUMBER}+${branch_sanitized}"
4444
if (publish) {
4545
build_number = "${env.BUILD_NUMBER}"
4646
}
47-
env.PIP_VERSION = "${matcher.group(1).toString()}.${matcher.group(2).toString()}.${build_number}"
47+
env.PIP_VERSION = "${matcher.group(1).toString()}.${matcher.group(2).toString()}.${build_number}"
4848
env.DOCKER_VERSION = env.PIP_VERSION.replaceAll('\\+', '-')
4949
} else if (branch.startsWith("release%2F")) {
50-
throw new Exception("Unexpected release branch format ${branch}, expected 'release%2fNUMBER.NUMBER'")
50+
throw new Exception("Unexpected release branch format ${branch}, expected 'release%2fNUMBER.NUMBER.NUMBER'")
5151
} else {
5252
env.PIP_VERSION = "0.0.dev${env.BUILD_NUMBER}+${branch_sanitized}"
5353
env.DOCKER_VERSION = env.PIP_VERSION.replaceAll('\\+', '-')

0 commit comments

Comments
 (0)