From 80bc64e32eea7ef6c4528f0374dace9d19b4553b Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 24 Feb 2022 23:16:06 +0000 Subject: [PATCH] Supply release tag processing --- release/tag.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release/tag.groovy b/release/tag.groovy index be1944f..2574fbc 100644 --- a/release/tag.groovy +++ b/release/tag.groovy @@ -16,11 +16,11 @@ def LinkedHashMap startswithspecialprefix(String releasetag) { def String prefixfound = '' def String tagwithoutprefix = releasetag - def rtsplits = releasetag.split(RELEASETAG_PREFIX_SEPERATOR) - if (rtsplits.size() > 0) - prefixfound = rtsplits[0].toLowerCase() + def firstseperatorindex = releasetag.indexOf(RELEASETAG_PREFIX_SEPERATOR) + if (firstseperatorindex > 0) + prefixfound = releasetag[0..(firstseperatorindex - 1)].toLowerCase() hasspecialprefix = RELEASETAG_PREFIXES.containsKey(prefixfound) - tagwithoutprefix = rtsplits[1..].join(RELEASETAG_PREFIX_SEPERATOR) + tagwithoutprefix = releasetag[(firstseperatorindex + 1)..-1] } return [ 'hasspecialprefix' : hasspecialprefix, 'prefixfound' : prefixfound,