comparison init40-git.gradle @ 333:10e2b8595ace

list all branches
author Marc Davis <davis@ssdt-ohio.org>
date Mon, 06 Mar 2023 15:13:17 -0500
parents ae546c35dee4
children 64a8d53c6d98
comparison
equal deleted inserted replaced
332:ae546c35dee4 333:10e2b8595ace
808 } 808 }
809 } 809 }
810 .findAll { it != null } 810 .findAll { it != null }
811 .sort { v1, v2 -> v2 <=> v1 } 811 .sort { v1, v2 -> v2 <=> v1 }
812 812
813 def branches = "git branch --remote".execute().text.split("\n") 813 def branches = "git branch --all".execute().text.split("\n")
814 .findAll { it.contains('release') || it.contains('hotfix') } 814 .findAll { it.contains('release') || it.contains('hotfix') }
815 .collect { it.replaceAll('\\s+', ' ').split(' ')[1].split('/')[2] - 'v' } 815 .collect { it.replaceAll('\\s+', ' ').split(' ')[1].split('/')[2] - 'v' }
816 .collect { new Version(*it.split('\\.')*.toInteger()) } 816 .collect { new Version(*it.split('\\.')*.toInteger()) }
817 817
818 def results = (branches + versions).sort { v1, v2 -> v2 <=> v1 } 818 def results = (branches + versions).sort { v1, v2 -> v2 <=> v1 }