Make sure product name and sub component names can be used in tags
This commit is contained in:
parent
f08e4ba3aa
commit
e02d609283
1 changed files with 9 additions and 0 deletions
|
|
@ -31,6 +31,15 @@ class ProductInfo extends GISJsonSerialised {
|
|||
}
|
||||
|
||||
void set(String productname, String subcomponentname, String jirakey) {
|
||||
// Make sure the fields can be used in git tags
|
||||
def int pstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${productname}\"", , returnStatus: true)
|
||||
if (pstatus > 0) {
|
||||
script.error("The product name: ${productname} needs to be renamed as it cannot be used in a git tag name")
|
||||
}
|
||||
def int sstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${subcomponentname}\"", , returnStatus: true)
|
||||
if (sstatus > 0) {
|
||||
script.error("The subcomponent name: ${subcomponentname} needs to be renamed as it cannot be used in a git tag name")
|
||||
}
|
||||
this.productname = productname
|
||||
this.subcomponentname = subcomponentname
|
||||
this.jirakey = jirakey
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue