HMBFDHV-560 - Store product variant in meta productinfo

This commit is contained in:
Dan Hawkins 2021-02-26 18:07:30 +00:00
commit ca6f895b92

View file

@ -53,14 +53,14 @@ class ProductInfo extends GISJsonSerialised {
script.error("The subcomponent name: ${subcomponentname} needs to be renamed as it cannot be used in a git tag name")
}
if (variant) {
def int sstatus = 0
def int vstatus = 0
if (script.isUnix()) {
sstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${variant}\" >/dev/null 2>/dev/null", , returnStatus: true)
vstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${variant}\" >/dev/null 2>/dev/null", , returnStatus: true)
}
else {
sstatus = script.bat(script: "@git check-ref-format --normalize \"refs/tags/${variant}\" > NUL 2> NUL", , returnStatus: true)
vstatus = script.bat(script: "@git check-ref-format --normalize \"refs/tags/${variant}\" > NUL 2> NUL", , returnStatus: true)
}
if (sstatus > 0) {
if (vstatus > 0) {
script.error("The subcomponent name: ${variant} needs to be renamed as it cannot be used in a git tag name")
}
}