Mercurial > public > develkit
comparison init70-github.gradle @ 348:aa5e8be335d6
add println to see env props
author | Marc Davis <marc.davis@mcoecn.org> |
---|---|
date | Tue, 25 Jul 2023 15:58:59 -0400 |
parents | 1d55012b6af3 |
children | 49e02e6dcce6 |
comparison
equal
deleted
inserted
replaced
347:1d55012b6af3 | 348:aa5e8be335d6 |
---|---|
33 hostname = "hostname".execute().text.toLowerCase().readLines().first() | 33 hostname = "hostname".execute().text.toLowerCase().readLines().first() |
34 } catch (e) { | 34 } catch (e) { |
35 hostname = 'unknown' | 35 hostname = 'unknown' |
36 } | 36 } |
37 | 37 |
38 println "System Env" | |
39 System.getenv().each { | |
40 " -> " + it.toString() | |
41 } | |
42 | |
38 //Determine if the build is a CI build. | 43 //Determine if the build is a CI build. |
39 gradle.ext.bambooBuild = System.getenv().any { | 44 gradle.ext.bambooBuild = System.getenv().any { |
40 println it.toString() | |
41 it.key.toLowerCase().contains('ci') || | 45 it.key.toLowerCase().contains('ci') || |
42 it.key.toLowerCase().contains('github') | 46 it.key.toLowerCase().contains('github') |
43 } | 47 } |
44 | 48 |
45 gradle.ext.bambooLocalBuild = false | 49 gradle.ext.bambooLocalBuild = false |
701 } | 705 } |
702 | 706 |
703 } | 707 } |
704 | 708 |
705 void setBranchInfo() { | 709 void setBranchInfo() { |
706 gradle.ext.branch = new BranchInfo(System.getenv('head_ref')) | 710 gradle.ext.branch = new BranchInfo(System.getenv('ssdt_head_ref')) |
707 gradle.ext.branchName = gradle.branch.name | 711 gradle.ext.branchName = gradle.branch.name |
708 gradle.ext.branchStream = gradle.branch.stream | 712 gradle.ext.branchStream = gradle.branch.stream |
709 gradle.ext.branchHash = gradle.branch.hash | 713 gradle.ext.branchHash = gradle.branch.hash |
710 println "${gradle.hgRepositoryUrl} ${gradle.branch} ${gradle.branch.version}" | 714 println "${gradle.hgRepositoryUrl} ${gradle.branch} ${gradle.branch.version}" |
711 } | 715 } |
727 if (!name) { | 731 if (!name) { |
728 this.name = determineName() ?: '' | 732 this.name = determineName() ?: '' |
729 } | 733 } |
730 this.name = this.name.replace('@', '-') | 734 this.name = this.name.replace('@', '-') |
731 determineStream() | 735 determineStream() |
732 buildNumber = System.getenv('run_number') ?: "" | 736 buildNumber = System.getenv('ssdt_run_number') ?: "" |
733 changeset = System.getenv('sha') ?: "" | 737 changeset = System.getenv('ssdt_sha') ?: "" |
734 } | 738 } |
735 | 739 |
736 String getDefaultDependencyStatus() { | 740 String getDefaultDependencyStatus() { |
737 return isRelease() ? 'release' : 'integration' | 741 return isRelease() ? 'release' : 'integration' |
738 } | 742 } |
781 } | 785 } |
782 | 786 |
783 private Version findSnapshotVersion() { | 787 private Version findSnapshotVersion() { |
784 println "findSnapshotVersion()" | 788 println "findSnapshotVersion()" |
785 try { | 789 try { |
786 def repositoryUrl = System.getenv('repositoryUrl') | 790 def repositoryUrl = System.getenv('ssdt_repositoryUrl') |
787 if (repositoryUrl) { | 791 if (repositoryUrl) { |
788 println "git pull $repositoryUrl".execute().text | 792 println "git pull $repositoryUrl".execute().text |
789 } | 793 } |
790 def versions = "git tag".execute().text.split("\n") | 794 def versions = "git tag".execute().text.split("\n") |
791 .findAll { it != null || it != "" } | 795 .findAll { it != null || it != "" } |