Mercurial > public > develkit
diff init40-github.gradle @ 349:45fc06cbb6b2
use github system properties
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Wed, 26 Jul 2023 08:30:15 -0400 |
parents | 9791f84cfc67 |
children | 7b6d30651db7 |
line wrap: on
line diff
--- a/init40-github.gradle Tue Jul 25 15:58:59 2023 -0400 +++ b/init40-github.gradle Wed Jul 26 08:30:15 2023 -0400 @@ -706,7 +706,7 @@ } void setBranchInfo() { - def branchInfo = new BranchInfo(System.getenv('bamboo_planRepository_branch')) + def branchInfo = new BranchInfo(System.getenv('ssdt_head_ref')) gradle.ext.branch = branchInfo gradle.ext.branchName = gradle.branch.name gradle.ext.branchStream = gradle.branch.stream @@ -715,7 +715,6 @@ } -@ToString(includes=['name','shortName','buildVersion','imageId','deployName'],includeNames= true) class BranchInfo { def name def stream = "none" @@ -723,6 +722,10 @@ def changeset = "" def version + String toString() { + "{name:$name, stream:$stream, buildNumber:$buildNumber, changeSet:$changeset, version:$version}" + } + BranchInfo(name) { this.name = name if (!name) { @@ -730,8 +733,8 @@ } this.name = this.name.replace('@', '-') determineStream() - buildNumber = System.getenv('bamboo_buildNumber') ?: "" - changeset = System.getenv('bamboo_planRepository_revision') ?: "" + buildNumber = System.getenv('ssdt_run_number') ?: "" + changeset = System.getenv('ssdt_sha') ?: "" } String getDefaultDependencyStatus() { @@ -784,7 +787,7 @@ private Version findSnapshotVersion() { println "findSnapshotVersion()" try { - def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl') + def repositoryUrl = System.getenv('ssdt_repositoryUrl') if (repositoryUrl) { println "git pull $repositoryUrl".execute().text }