Mercurial > public > develkit
changeset 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 |
files | init20-git.gradle init40-git.gradle init50-git.gradle init70-git.gradle |
diffstat | 4 files changed, 4 insertions(+), 4 deletions(-) [+] |
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 }
--- 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 }
--- a/init50-git.gradle Mon Mar 06 15:13:17 2023 -0500 +++ b/init50-git.gradle Mon Mar 06 15:36:07 2023 -0500 @@ -810,7 +810,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 }
--- a/init70-git.gradle Mon Mar 06 15:13:17 2023 -0500 +++ b/init70-git.gradle Mon Mar 06 15:36:07 2023 -0500 @@ -805,7 +805,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 }