Mercurial > public > develkit
comparison init40-git.gradle @ 300:eaed73a5ec1d
add println for bamboo debugging
author | Marc Davis <davis@ssdt-ohio.org> |
---|---|
date | Wed, 01 Feb 2023 08:03:29 -0500 |
parents | 5e9e2ea82657 |
children | 74d939ce70d5 |
comparison
equal
deleted
inserted
replaced
299:5e9e2ea82657 | 300:eaed73a5ec1d |
---|---|
797 def digest = java.security.MessageDigest.getInstance("MD5") | 797 def digest = java.security.MessageDigest.getInstance("MD5") |
798 digest.update(s.bytes); | 798 digest.update(s.bytes); |
799 new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0') | 799 new BigInteger(1, digest.digest()).toString(16).padLeft(32, '0') |
800 } | 800 } |
801 | 801 |
802 private findSnapshotVersion() { | 802 private Version findSnapshotVersion() { |
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 if (repositoryUrl) { | 806 if (repositoryUrl) { |
807 println "git pull $repositoryUrl".execute().text | 807 println "git pull $repositoryUrl".execute().text |
808 } | 808 } |
809 println "git tag".execute().text | |
809 def versions = "git tag".execute().text.split("\n") | 810 def versions = "git tag".execute().text.split("\n") |
810 .collect { it.replace("v", "") } | 811 .collect { it.replace("v", "") } |
811 .collect { new Version(*it.split('\\.')*.toInteger()) } | 812 .collect { new Version(*it.split('\\.')*.toInteger()) } |
812 .sort { v1, v2 -> v2 <=> v1 } | 813 .sort { v1, v2 -> v2 <=> v1 } |
813 return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot() | 814 return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot() |
814 } catch (ignored) { | 815 } catch (ex) { |
816 println ex | |
815 return new Version().nextSnapshot() | 817 return new Version().nextSnapshot() |
816 } | 818 } |
817 } | 819 } |
818 | 820 |
819 def determineName() { | 821 def determineName() { |