File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,16 +38,16 @@ def do_publish = params.publish_pypi
3838@NonCPS
3939boolean 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('\\+', '-')
You can’t perform that action at this time.
0 commit comments