diff init20-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 7bc7c6c79d7c
children de8c350c511a
line wrap: on
line diff
--- a/init20-git.gradle	Mon Mar 06 15:13:17 2023 -0500
+++ b/init20-git.gradle	Mon Mar 06 15:36:07 2023 -0500
@@ -845,7 +845,7 @@
 
             def branches = "git branch --remote".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 }