Supply release tag processing

This commit is contained in:
Dan Hawkins 2022-02-24 23:16:06 +00:00
commit 80bc64e32e

View file

@ -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,