comparison init40-git.gradle @ 302:e93dd94dd831

more printlns
author Marc Davis <davis@ssdt-ohio.org>
date Wed, 01 Feb 2023 08:22:36 -0500
parents 74d939ce70d5
children bd44c63562fc
comparison
equal deleted inserted replaced
301:74d939ce70d5 302:e93dd94dd831
803 println "findSnapshotVersion()" 803 println "findSnapshotVersion()"
804 try { 804 try {
805 def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl') 805 def repositoryUrl = System.getenv('bamboo_planRepository_repositoryUrl')
806 println "Repo URL : ${repositoryUrl}" 806 println "Repo URL : ${repositoryUrl}"
807 if (repositoryUrl) { 807 if (repositoryUrl) {
808 println "pull from git repo - ${repositoryUrl}"
808 println "git pull $repositoryUrl".execute().text 809 println "git pull $repositoryUrl".execute().text
809 } 810 }
811 println "run git tags"
810 println "git tag".execute().text 812 println "git tag".execute().text
811 def versions = "git tag".execute().text.split("\n") 813 def versions = "git tag".execute().text.split("\n")
814 .filter { it != null || it != "" }
812 .collect { it.replace("v", "") } 815 .collect { it.replace("v", "") }
813 .collect { new Version(*it.split('\\.')*.toInteger()) } 816 .collect { new Version(*it.split('\\.')*.toInteger()) }
814 .sort { v1, v2 -> v2 <=> v1 } 817 .sort { v1, v2 -> v2 <=> v1 }
815 return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot() 818 return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot()
816 } catch (ex) { 819 } catch (ex) {