comparison init40-git.gradle @ 310:7bf282e58ce7

remove printlns
author Marc Davis <davis@ssdt-ohio.org>
date Wed, 01 Feb 2023 10:42:12 -0500
parents b80dc2412882
children 0a6b93585fbf
comparison
equal deleted inserted replaced
309:b80dc2412882 310:7bf282e58ce7
720 gradle.ext.branch = branchInfo 720 gradle.ext.branch = branchInfo
721 gradle.ext.branchName = gradle.branch.name 721 gradle.ext.branchName = gradle.branch.name
722 gradle.ext.branchStream = gradle.branch.stream 722 gradle.ext.branchStream = gradle.branch.stream
723 gradle.ext.branchHash = gradle.branch.hash 723 gradle.ext.branchHash = gradle.branch.hash
724 println "${gradle.hgRepositoryUrl} ${gradle.branch} ${gradle.branch.version}" 724 println "${gradle.hgRepositoryUrl} ${gradle.branch} ${gradle.branch.version}"
725
726 println "----- Branch Info ----------------------"
727 println "Name : $branchInfo.name"
728 println "Stream : $branchInfo.stream"
729 println "Build Number : $branchInfo.buildNumber"
730 println "Change Set : $branchInfo.changeset"
731 println "Version : $branchInfo.version"
732 println "----------------------------------------"
733 } 725 }
734 726
735 727
736 @ToString(includes=['name','shortName','buildVersion','imageId','deployName'],includeNames= true) 728 @ToString(includes=['name','shortName','buildVersion','imageId','deployName'],includeNames= true)
737 class BranchInfo { 729 class BranchInfo {
801 793
802 private Version findSnapshotVersion() { 794 private Version findSnapshotVersion() {
803 println "findSnapshotVersion()" 795 println "findSnapshotVersion()"
804 try { 796 try {
805 def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl') 797 def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl')
806 println "Repo URL : ${repositoryUrl}"
807 if (repositoryUrl) { 798 if (repositoryUrl) {
808 println "pull from git repo - ${repositoryUrl}"
809 println "git pull $repositoryUrl".execute().text 799 println "git pull $repositoryUrl".execute().text
810 println "run git branch" 800 }
811 println "git branch".execute().text
812 println "checkout main"
813 println "git checkout main".execute().text
814 }
815 println "run git tags"
816 println "git fetch --tags --all --verbose".execute().text
817 println "run git describe --tags --abbrev=0"
818 println "git describe --tags --abbrev=0".execute().text
819 def versions = "git tag".execute().text.split("\n") 801 def versions = "git tag".execute().text.split("\n")
820 .findAll { it != null || it != "" } 802 .findAll { it != null || it != "" }
821 .collect { it.replace("v", "") } 803 .collect { it.replace("v", "") }
822 .collect { new Version(*it.split('\\.')*.toInteger()) } 804 .collect { new Version(*it.split('\\.')*.toInteger()) }
823 .sort { v1, v2 -> v2 <=> v1 } 805 .sort { v1, v2 -> v2 <=> v1 }