diff init50-git.gradle @ 345:172495bee8a1

use git branch --all to find release branches.
author Marc Davis <marc.davis@mcoecn.org>
date Wed, 14 Jun 2023 14:42:03 -0400
parents 0bef709263cd
children de8c350c511a
line wrap: on
line diff
--- a/init50-git.gradle	Wed Jun 14 14:38:11 2023 -0400
+++ b/init50-git.gradle	Wed Jun 14 14:42:03 2023 -0400
@@ -809,17 +809,12 @@
                     .findAll { it != null }
                     .sort { v1, v2 -> v2 <=> v1 }
 
-            def branches = "git branch --remote".execute().text.split("\n")
-                    .findAll {
-                        println "Found branch ($it)"
-                        it.contains('release') || it.contains('hotfix')
-                    }
+            def branches = "git branch --all".execute().text.split("\n")
+                    .findAll {it.contains('release') || it.contains('hotfix')  }
                     .collect { it.replaceAll('\\s+', ' ').split('/').last() - 'v' }
                     .collect { new Version(*it.split('\\.')*.toInteger()) }
 
             def results = (branches + versions).sort { v1, v2 -> v2 <=> v1 }
-            results.each { println  it }
-            println "Selected version : ${results.first().nextSnapshot()}"
             if (results.isEmpty()) {
                 return new Version().nextSnapshot()
             } else {