Calculator's build number in release builds follows the pattern 10.{YYMM}.{build}.0. We use the build number in lots of places, including the app binaries, the app package version, and the app bundle version. Before Calculator moved to GitHub, the app bundle version was generated using a date-based formula which produced versions like "2019.105.612.0". This means that the bundles generated from GitHub have a lower version than previous bundles. This appears to cause some issues during device reset. This change sets the app bundle major version number to "2020" to ensure that newly-produced appxbundles have higher versions than legacy bundles. The remaining parts of the bundle version number will match the build number for easy reference. Also updating the MakeAppx version used in bundle creation to 18362.
62 lines
2.3 KiB
YAML
62 lines
2.3 KiB
YAML
# This template contains a job which takes .appx packages which were built separately for each
|
|
# architecture (arm, x86, etc.) and combines them into a single .appxbundle.
|
|
|
|
jobs:
|
|
- job: Package
|
|
dependsOn:
|
|
- Buildx64
|
|
- Buildx86
|
|
- BuildARM
|
|
- BuildARM64
|
|
condition: |
|
|
and
|
|
(
|
|
in(dependencies.Buildx64.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
|
in(dependencies.Buildx86.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
|
in(dependencies.BuildARM.result, 'Succeeded', 'SucceededWithIssues', 'Skipped'),
|
|
in(dependencies.BuildARM64.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
|
|
)
|
|
pool:
|
|
vmImage: windows-2019
|
|
workspace:
|
|
clean: outputs
|
|
variables:
|
|
skipComponentGovernanceDetection: true
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
|
|
- task: DownloadBuildArtifacts@0
|
|
displayName: Download all .appx artifacts
|
|
inputs:
|
|
artifactName: drop
|
|
itemPattern: '**/*.appx'
|
|
|
|
- task: PowerShell@2
|
|
displayName: Generate AppxBundle mapping
|
|
inputs:
|
|
filePath: $(Build.SourcesDirectory)\build\scripts\CreateAppxBundleMapping.ps1
|
|
arguments: '-InputPath $(Build.ArtifactStagingDirectory)\drop\Release -ProjectName Calculator -OutputFile $(Build.BinariesDirectory)\AppxBundleMapping.txt'
|
|
|
|
- powershell: |
|
|
$buildVersion = [version]$Env:BUILDVERSION
|
|
$bundleVersion = "2020.$($buildVersion.Minor).$($buildVersion.Build).$($buildVersion.Revision)"
|
|
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\MakeAppx.exe" bundle /v /bv $bundleVersion /f $Env:MAPPINGFILEPATH /p $Env:OUTPUTPATH
|
|
displayName: Make AppxBundle
|
|
env:
|
|
BUILDVERSION: $(Build.BuildNumber)
|
|
MAPPINGFILEPATH: $(Build.BinariesDirectory)\AppxBundleMapping.txt
|
|
OUTPUTPATH: $(Build.BinariesDirectory)\Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
|
|
|
- task: CopyFiles@2
|
|
displayName: Copy AppxBundle to staging directory
|
|
inputs:
|
|
sourceFolder: $(Build.BinariesDirectory)
|
|
contents: Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle
|
|
targetFolder: $(Build.ArtifactStagingDirectory)\appxBundle
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish AppxBundle artifact
|
|
inputs:
|
|
artifactName: appxBundle
|
|
pathToPublish: $(Build.ArtifactStagingDirectory)\appxBundle |