diff --git a/Jenkinsfile b/Jenkinsfile index ddb9cb9..e2fa0e2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -123,8 +123,11 @@ spec: if (!base) { base = "0.1.0" } - def count = sh(returnStdout: true, script: 'git rev-list --count HEAD').trim() - semver = "${base}-${count}" + def buildNum = env.BUILD_NUMBER?.trim() + if (!buildNum) { + buildNum = sh(returnStdout: true, script: 'git rev-list --count HEAD').trim() + } + semver = "${base}-${buildNum}" } sh "echo SEMVER=${semver} > build.env" } diff --git a/VERSION_BASE b/VERSION_BASE index 17e51c3..d917d3e 100644 --- a/VERSION_BASE +++ b/VERSION_BASE @@ -1 +1 @@ -0.1.1 +0.1.2