From 2a77030a0b1bd7db0fc2fd997cdff6ef0bdd11d0 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Tue, 30 Jul 2024 13:16:00 -0700 Subject: [PATCH] Enumerate over all signed zip packages (#24063) --- .pipelines/templates/mac-package-build.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.pipelines/templates/mac-package-build.yml b/.pipelines/templates/mac-package-build.yml index b6df81233c..2da8c2b761 100644 --- a/.pipelines/templates/mac-package-build.yml +++ b/.pipelines/templates/mac-package-build.yml @@ -209,18 +209,20 @@ jobs: - pwsh: | $signedPkg = Get-ChildItem -Path $(Pipeline.Workspace) -Filter "*osx*.zip" -File - Write-Verbose -Verbose "Signed package zip: $signedPkg" + $signedPkg | ForEach-Object { + Write-Verbose -Verbose "Signed package zip: $_" - if (-not (Test-Path $signedPkg)) { - throw "Package not found: $signedPkg" + if (-not (Test-Path $_)) { + throw "Package not found: $_" + } + + if (-not (Test-Path $env:ob_outputDirectory)) { + $null = New-Item -Path $env:ob_outputDirectory -ItemType Directory + } + + Expand-Archive -Path $_ -DestinationPath $env:ob_outputDirectory -Verbose } - if (-not (Test-Path $env:ob_outputDirectory)) { - $null = New-Item -Path $env:ob_outputDirectory -ItemType Directory - } - - Expand-Archive -Path $signedPkg -DestinationPath $env:ob_outputDirectory -Verbose - Write-Verbose -Verbose "Expanded pkg file:" Get-ChildItem -Path $env:ob_outputDirectory | Write-Verbose -Verbose displayName: Expand signed file