Make sure product name and sub component names can be used in tags
This commit is contained in:
parent
f4688da007
commit
5e7a447a10
1 changed files with 2 additions and 2 deletions
|
|
@ -32,11 +32,11 @@ 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)
|
||||
def int pstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${productname}\" >/dev/null 2>/dev/null", , 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)
|
||||
def int sstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${subcomponentname}\" >/dev/null 2>/dev/null", , 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")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue