diff init40-git.gradle @ 334:64a8d53c6d98

change how the version is parsed from git commands
author Marc Davis <davis@ssdt-ohio.org>
date Mon, 06 Mar 2023 15:36:07 -0500
parents 10e2b8595ace
children 6ffbb6233f85
line wrap: on
line diff
--- a/init40-git.gradle	Mon Mar 06 15:13:17 2023 -0500
+++ b/init40-git.gradle	Mon Mar 06 15:36:07 2023 -0500
@@ -812,7 +812,7 @@
 
             def branches = "git branch --all".execute().text.split("\n")
                     .findAll { it.contains('release') || it.contains('hotfix') }
-                    .collect { it.replaceAll('\\s+', ' ').split(' ')[1].split('/')[2] - 'v' }
+                    .collect { it.replaceAll('\\s+', ' ').split('/').last() - 'v' }
                     .collect { new Version(*it.split('\\.')*.toInteger()) }
 
             def results = (branches + versions).sort { v1, v2 -> v2 <=> v1 }