Enumerate over all signed zip packages (#24063)

This commit is contained in:
Aditya Patwardhan
2024-07-30 13:16:00 -07:00
committed by GitHub
parent 963a4bd09b
commit 2a77030a0b
+11 -9
View File
@@ -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