Skip to content

Commit 62d4271

Browse files
committed
Fix the copy of msixbundle package
1 parent dd789a9 commit 62d4271

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.pipelines/MSIXBundle-vPack-Official.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,24 @@ extends:
114114
displayName: Download package
115115

116116
- pwsh: |
117-
Get-ChildItem '$(Pipeline.Workspace)\PSPackagesOfficial' -Recurse | Out-String -Width 150
117+
$payloadDir = '$(Pipeline.Workspace)\PSPackagesOfficial\drop_msixbundle_CreateMSIXBundle'
118+
Get-ChildItem $payloadDir -Recurse | Out-String -Width 150
119+
$vstsCommandString = "vso[task.setvariable variable=PayloadDir]$payloadDir"
120+
Write-Host "sending " + $vstsCommandString
121+
Write-Host "##$vstsCommandString"
118122
displayName: 'Capture Artifact Listing'
119123
120124
- pwsh: |
121-
$bundlePackage = Get-ChildItem '$(Pipeline.Workspace)\PSPackagesOfficial\*.msixbundle'
125+
$bundlePackage = Get-ChildItem '$(PayloadDir)\*.msixbundle'
126+
Write-Verbose -Verbose ("MSIX bundle package: " + $bundlePackage.FullName -join ', ')
127+
if ($bundlePackage.Count -ne 1) {
128+
throw "Expected to find 1 MSIX bundle package, but found $($bundlePackage.Count)"
129+
}
130+
131+
if (-not (Test-Path '$(ob_outputDirectory)' -PathType Container)) {
132+
$null = New-Item '$(ob_outputDirectory)' -ItemType Directory -ErrorAction Stop
133+
}
134+
122135
$targetPath = Join-Path '$(ob_outputDirectory)' 'Microsoft.PowerShell_8wekyb3d8bbwe.msixbundle'
123136
Copy-Item -Verbose -Path $bundlePackage.FullName -Destination $targetPath
124137
displayName: 'Stage msixbundle for vpack'

0 commit comments

Comments
 (0)