comparison init20.gradle @ 211:908950abd490

add changeset to branchinfo
author smith@nwoca.org
date Sun, 27 Dec 2015 16:07:23 +0000
parents 068d09f5b627
children 0ca4f3c952b7
comparison
equal deleted inserted replaced
210:068d09f5b627 211:908950abd490
577 @ToString(includes=['name','shortName','buildVersion','imageId','deployName'],includeNames= true) 577 @ToString(includes=['name','shortName','buildVersion','imageId','deployName'],includeNames= true)
578 class BranchInfo { 578 class BranchInfo {
579 def name 579 def name
580 def stream = "none" 580 def stream = "none"
581 def buildNumber = "" 581 def buildNumber = ""
582 def changeset = ""
582 583
583 BranchInfo(name) { 584 BranchInfo(name) {
584 this.name = name 585 this.name = name
585 if (!name) { 586 if (!name) {
586 this.name = determineName() ?: '' 587 this.name = determineName() ?: ''
587 } 588 }
588 this.name = this.name.replace('@', '-') 589 this.name = this.name.replace('@', '-')
589 determineStream() 590 determineStream()
590 buildNumber = System.getenv('bamboo_buildNumber') ?: "" 591 buildNumber = System.getenv('bamboo_buildNumber') ?: ""
591 } 592 changeset = System.getenv('bamboo_planRepository_revision') ?: ""
593
594 }
592 595
593 def getShortName() { 596 def getShortName() {
594 def result = name.contains('/') ? name.split('/')[1] : name 597 def result = name.contains('/') ? name.split('/')[1] : name
595 } 598 }
596 599