From 5ca9fad0f15e3c79616f131fe854548db9e009cd Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 7 Oct 2021 14:49:26 -0700 Subject: [PATCH] Update Sbom.yml --- Sbom.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Sbom.yml b/Sbom.yml index 08a7235..3124493 100644 --- a/Sbom.yml +++ b/Sbom.yml @@ -33,10 +33,12 @@ steps: # This will break signing, but it is currently not enabled. - pwsh: | $manifestPath = Join-Path '${{ parameters.BuildDropPath }}' -ChildPath '_manifest\manifest.json' - Write-Verbose "manifestPath: $manifestPath" -verbose - $manifest = Get-Content $manifestPath | ConvertFrom-Json - Write-Verbose "oldRepo: $($manifest.Repo)" -verbose - $manifest.Repo = '${{ parameters.Build_Repository_Uri}}' - Write-Verbose "newRepo: $($manifest.Repo)" -verbose - $manifest | convertto-json -Compress | Out-File -FilePath $manifestPath -Force + if (Test-Path $manifestPath) { + Write-Verbose "manifestPath: $manifestPath" -verbose + $manifest = Get-Content $manifestPath | ConvertFrom-Json + Write-Verbose "oldRepo: $($manifest.Repo)" -verbose + $manifest.Repo = '${{ parameters.Build_Repository_Uri}}' + Write-Verbose "newRepo: $($manifest.Repo)" -verbose + $manifest | convertto-json -Compress | Out-File -FilePath $manifestPath -Force + } else { Write-Verbose "cloudbuild manifest doesn't exist" -verbose" } displayName: '${{ parameters.displayName }} - Fix repo'