From e67bbbe75a2fd600e867eea5ff36bbf90ddbe989 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Wed, 14 May 2025 12:16:35 -0700 Subject: [PATCH] build: stage the command palette as a separate artifact (#39422) This will ensure that the command palette package is copied to the artifact directory. If code signing was enabled, the final copied package will be the signed version. Minor build rule rearranging was required to collect the command palette package path for the staging step when signing was _disabled_. I did this solely so that we could verify the results in CI. --- .pipelines/v2/templates/job-build-project.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index d9d8da5773..d386ec15dd 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -399,13 +399,13 @@ jobs: **\UnitTests-FancyZones.dll !**\obj\** - - ${{ if eq(parameters.codeSign, true) }}: - - pwsh: |- - $Package = (Get-ChildItem -Recurse -Filter "Microsoft.CmdPal.UI_*.msix" | Select -First 1) - $PackageFilename = $Package.FullName - Write-Host "##vso[task.setvariable variable=CmdPalPackagePath]${PackageFilename}" - displayName: Locate the MSIX + - pwsh: |- + $Package = (Get-ChildItem -Recurse -Filter "Microsoft.CmdPal.UI_*.msix" | Select -First 1) + $PackageFilename = $Package.FullName + Write-Host "##vso[task.setvariable variable=CmdPalPackagePath]${PackageFilename}" + displayName: Locate the CmdPal MSIX + - ${{ if eq(parameters.codeSign, true) }}: - pwsh: |- & "$(MakeAppxPath)" unpack /p "$(CmdPalPackagePath)" /d "$(JobOutputDirectory)/CmdPalPackageContents" displayName: Unpack the MSIX for signing @@ -425,6 +425,8 @@ jobs: $PackageFilename = Join-Path $outDir.FullName (Split-Path -Leaf "$(CmdPalPackagePath)") & "$(MakeAppxPath)" pack /h SHA256 /o /p $PackageFilename /d "$(JobOutputDirectory)/CmdPalPackageContents" Copy-Item -Force $PackageFilename "$(CmdPalPackagePath)" + Remove-Item -Force -Recurse "$(JobOutputDirectory)/CmdPalPackageContents" -ErrorAction:Ignore + Remove-Item -Force -Recurse "$(JobOutputDirectory)/_appx" -ErrorAction:Ignore displayName: Re-pack the new CmdPal package after signing - template: steps-esrp-signing.yml @@ -447,6 +449,10 @@ jobs: batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_DSC.json' ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' + - pwsh: |- + Copy-Item -Verbose -Force "$(CmdPalPackagePath)" "$(JobOutputDirectory)" + displayName: Stage the final CmdPal package + - template: steps-build-installer.yml parameters: codeSign: ${{ parameters.codeSign }}