Handle pre-generated buildnumber

This commit is contained in:
Dan Hawkins 2021-12-03 10:12:01 +00:00
commit 603e13cb81

View file

@ -295,14 +295,16 @@ class BuildStampInfo extends GISJsonSerialised {
// Override the buildstamp
void override(String buildstamp) {
def s = buildstamp.split('\\.')
this.buildstamp = buildstamp
script.echo("Build stamp overridden to: ${this.buildstamp}")
def s = this.buildstamp.split('\\.')
if (s.size() != 4) {
script.error("Overriding build stamp: ${buildstamp} is not of the format: 1.2.3.4")
}
this.stampprefix = "${s[0]}.${s[1]}.${s[2]}"
script.echo("Stamp prefix overridden to: ${this.stampprefix}")
this.revision = s[3].toInteger()
this.buildstamp = buildstamp
script.echo("Build stamp overridden to: ${this.buildstamp}")
script.echo("Revision overridden to: ${this.revision}")
}
String buildstampcommasep() {