Correct scope of MAXVERSIONNUMBER

This commit is contained in:
Dan Hawkins 2018-11-28 11:37:10 +00:00
commit 1955cdd110

View file

@ -1,3 +1,4 @@
int MAXVERSIONNUMBER = 65535
def getGitRevision(String gitrootpath, int basebuildnumber) {
def int adjustedchangecount
@ -5,8 +6,6 @@ def getGitRevision(String gitrootpath, int basebuildnumber) {
def String remoteinfo
def String remoteurl
dir( gitrootpath) {
def int MAXVERSIONNUMBER = 65535
def int changecount = sh(returnStdout: true, script: "git rev-list HEAD --count").trim()
echo "Change count: ${changecount}"
adjustedchangecount = (changecount + basebuildnumber) % (MAXVERSIONNUMBER + 1)
@ -28,8 +27,6 @@ def getGitRevision(String gitrootpath, int basebuildnumber) {
// origin/master
// origin/2.0.x
def getVersionPrefix(String sourcebranch) {
def int MAXVERSIONNUMBER = 65535
echo "Determining version number prefix from source branch name: ${sourcebranch}"
sourcebranch = sourcebranch.toLowerCase()