comparison init40-git.gradle @ 303:bd44c63562fc

more printlns
author Marc Davis <davis@ssdt-ohio.org>
date Wed, 01 Feb 2023 08:23:34 -0500
parents e93dd94dd831
children 063d6b2cc5af
comparison
equal deleted inserted replaced
302:e93dd94dd831 303:bd44c63562fc
809 println "git pull $repositoryUrl".execute().text 809 println "git pull $repositoryUrl".execute().text
810 } 810 }
811 println "run git tags" 811 println "run git tags"
812 println "git tag".execute().text 812 println "git tag".execute().text
813 def versions = "git tag".execute().text.split("\n") 813 def versions = "git tag".execute().text.split("\n")
814 .filter { it != null || it != "" } 814 .findAll { it != null || it != "" }
815 .collect { it.replace("v", "") } 815 .collect { it.replace("v", "") }
816 .collect { new Version(*it.split('\\.')*.toInteger()) } 816 .collect { new Version(*it.split('\\.')*.toInteger()) }
817 .sort { v1, v2 -> v2 <=> v1 } 817 .sort { v1, v2 -> v2 <=> v1 }
818 return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot() 818 return versions ? versions.first().nextSnapshot() : new Version().nextSnapshot()
819 } catch (ex) { 819 } catch (ex) {