Update logic to set shouldAddSBOM (#928)
This commit is contained in:
Родитель
ebeade0a6c
Коммит
4a1bcd57ab
|
@ -44,7 +44,20 @@ steps:
|
||||||
|
|
||||||
- pwsh: |
|
- pwsh: |
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$shouldAddSBOM = [bool]"$(IsReleaseBuild)"
|
|
||||||
|
$shouldAddSBOM = $null
|
||||||
|
if ([string]::IsNullOrEmpty($IsReleaseBuild))
|
||||||
|
{
|
||||||
|
Write-Host "IsReleaseBuild is null or empty. Setting shouldAddSBOM to false"
|
||||||
|
$shouldAddSBOM = $false
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "IsReleaseBuild: $IsReleaseBuild"
|
||||||
|
$shouldAddSBOM = ($IsReleaseBuild -eq "true")
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "shouldAddSBOM: $shouldAddSBOM"
|
||||||
|
|
||||||
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)" -AddSBOM:$shouldAddSBOM -SBOMUtilSASUrl "$(SBOMUtilSASUrl)"
|
./build.ps1 -Clean -Configuration Release -BuildNumber "$(buildNumber)" -AddSBOM:$shouldAddSBOM -SBOMUtilSASUrl "$(SBOMUtilSASUrl)"
|
||||||
displayName: 'Build worker code'
|
displayName: 'Build worker code'
|
||||||
|
|
Загрузка…
Ссылка в новой задаче