Convert from bat to powershell

This commit is contained in:
Dan Hawkins 2021-06-30 21:44:23 +01:00
commit 18addad030

View file

@ -38,7 +38,7 @@ class ProductInfo extends GISJsonSerialised {
pstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${productname}\" >/dev/null 2>/dev/null", , returnStatus: true)
}
else {
pstatus = script.powershell(script: "git check-ref-format --normalize \"refs/tags/${productname}\" > NUL 2> NUL", , returnStatus: true)
pstatus = script.powershell(script: "git check-ref-format --normalize \"refs/tags/${productname}\" 2>&1>\$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")
@ -48,7 +48,7 @@ class ProductInfo extends GISJsonSerialised {
sstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${subcomponentname}\" >/dev/null 2>/dev/null", , returnStatus: true)
}
else {
sstatus = script.powershell(script: "git check-ref-format --normalize \"refs/tags/${subcomponentname}\" > NUL 2> NUL", , returnStatus: true)
sstatus = script.powershell(script: "git check-ref-format --normalize \"refs/tags/${subcomponentname}\" 2>&1>\$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")
@ -59,7 +59,7 @@ class ProductInfo extends GISJsonSerialised {
vstatus = script.sh(script: "git check-ref-format --normalize \"refs/tags/${variant}\" >/dev/null 2>/dev/null", , returnStatus: true)
}
else {
vstatus = script.powershell(script: "git check-ref-format --normalize \"refs/tags/${variant}\" > NUL 2> NUL", , returnStatus: true)
vstatus = script.powershell(script: "git check-ref-format --normalize \"refs/tags/${variant}\" 2>&1>\$null", , returnStatus: true)
}
if (vstatus > 0) {
script.error("The subcomponent name: ${variant} needs to be renamed as it cannot be used in a git tag name")