Supply release tag processing
This commit is contained in:
parent
c2b27a869a
commit
64882035b9
1 changed files with 31 additions and 0 deletions
31
release/tag.groovy
Normal file
31
release/tag.groovy
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
def LinkedHashMap RELEASETAG_PREFIXES = [
|
||||
'superceded' : 'Misspelt - Indicates a later release has superseded the release with this prefix',
|
||||
'superseded' : 'Indicates a later release has superseded the release with this prefix',
|
||||
'erroneous' : 'The release was released unintentionally',
|
||||
'faulty' : 'The release was found to have a serious fault',
|
||||
'ignore' : 'The release should be ignored',
|
||||
'inmainline' : 'This release was associated with development branch which has now been merged into mainline',
|
||||
]
|
||||
|
||||
def RELEASETAG_PREFIX_SEPERATOR = '_'
|
||||
|
||||
def LinkedHashMap startswithspecialprefix(String releasetag) {
|
||||
def boolean hasspecialprefix = false
|
||||
def String releasetagprefix = ''
|
||||
def String prefixfound = ''
|
||||
def String tagwithoutprefix = releasetag
|
||||
|
||||
def rtsplits = releasetag.split(RELEASETAG_PREFIX_SEPERATOR)
|
||||
if (rtsplits.size() > 0)
|
||||
prefixfound = rtsplits[0].toLowerCase()
|
||||
hasspecialprefix = RELEASETAG_PREFIXES.containsKey(prefixfound)
|
||||
tagwithoutprefix = rtsplits[1..].join(RELEASETAG_PREFIX_SEPERATOR)
|
||||
}
|
||||
return [ 'hasspecialprefix' : hasspecialprefix,
|
||||
'prefixfound' : prefixfound,
|
||||
'tagwithoutprefix' : tagwithoutprefix,
|
||||
]
|
||||
}
|
||||
|
||||
return this;
|
||||
Loading…
Add table
Add a link
Reference in a new issue