Skip to content

Commit

Permalink
Update logic to set shouldAddSBOM (#928)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco-Gamino authored Mar 14, 2023
1 parent ebeade0 commit 4a1bcd5
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,20 @@ steps:

- pwsh: |
$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)"
displayName: 'Build worker code'
Expand Down

0 comments on commit 4a1bcd5

Please sign in to comment.