From de52b20ee9f20148e1abdcfafe506d374a3325bb Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Mon, 4 Apr 2022 16:46:54 -0500 Subject: [PATCH] Force the bundle major version to be over 3000 (#12819) Before #12691, the msixbundle version was of the format YYYY.MM.DD.0. After #12691, it became the same as the build of Terminal it contained. This caused some trouble for _some_ systems: major version 1 is much, much smaller than 2022. Adding 3000 to the major version component, _only for the bundle_, gets around this. Ugh. Fixes #12816. (cherry picked from commit bc6bf15a626b4235c35f2c57142f1fac4cd760d2) Service-Card-Id: 80144497 Service-Version: 1.13 --- build/pipelines/release.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/build/pipelines/release.yml b/build/pipelines/release.yml index 79294c56cb7..942be839bac 100644 --- a/build/pipelines/release.yml +++ b/build/pipelines/release.yml @@ -313,11 +313,16 @@ jobs: displayName: Download Artifacts ${{ platform }} $(TerminalTargetWindowsVersion) inputs: artifactName: appx-${{ platform }}-Release-$(TerminalTargetWindowsVersion) - - task: PowerShell@2 + # Add 3000 to the major version component, but only for the bundle. + # This is to ensure that it is newer than "2022.xx.yy.zz" or whatever the original bundle versions were before + # we switched to uniform naming. + - pwsh: |- + $VersionEpoch = 3000 + $Components = "$(XES_APPXMANIFESTVERSION)" -Split "\." + $Components[0] = ([int]$Components[0] + $VersionEpoch) + $BundleVersion = $Components -Join "." + .\build\scripts\Create-AppxBundle.ps1 -InputPath "$(System.ArtifactsDirectory)" -ProjectName CascadiaPackage -BundleVersion $BundleVersion -OutputPath "$(System.ArtifactsDirectory)\Microsoft.WindowsTerminal_$(TerminalTargetWindowsVersion)_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle" displayName: Create WindowsTerminal*.msixbundle - inputs: - filePath: build\scripts\Create-AppxBundle.ps1 - arguments: -InputPath "$(System.ArtifactsDirectory)" -ProjectName CascadiaPackage -BundleVersion $(XES_APPXMANIFESTVERSION) -OutputPath "$(System.ArtifactsDirectory)\Microsoft.WindowsTerminal_$(TerminalTargetWindowsVersion)_$(XES_APPXMANIFESTVERSION)_8wekyb3d8bbwe.msixbundle" - task: EsrpCodeSigning@1 displayName: Submit *.msixbundle to ESRP for code signing inputs: