From 3896ea1de9287959c9b3b63fd251b3b4fab30058 Mon Sep 17 00:00:00 2001 From: Kenny Guo Date: Tue, 27 Jul 2021 10:45:37 +0800 Subject: [PATCH] Update minVersion in appxmanifest only when public release --- .../azure-pipelines.ci-internal.yaml | 8 ++++++++ .../azure-pipelines.release.test.yaml | 20 +++++++++++++------ build/pipelines/azure-pipelines.release.yaml | 20 +++---------------- .../templates/build-single-architecture.yaml | 5 ++--- build/scripts/UpdateAppxManifestVersion.ps1 | 2 +- 5 files changed, 28 insertions(+), 27 deletions(-) diff --git a/build/pipelines/azure-pipelines.ci-internal.yaml b/build/pipelines/azure-pipelines.ci-internal.yaml index 6014b53b..a3f3847a 100644 --- a/build/pipelines/azure-pipelines.ci-internal.yaml +++ b/build/pipelines/azure-pipelines.ci-internal.yaml @@ -20,16 +20,24 @@ jobs: - template: ./templates/build-app-internal.yaml parameters: platform: x86 + condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/build-app-internal.yaml parameters: platform: ARM + condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/run-ui-tests.yaml parameters: platform: x64 runsettingsFileName: CalculatorUITests.release.runsettings +- template: ./templates/run-ui-tests.yaml + parameters: + platform: x86 + runsettingsFileName: CalculatorUITests.release.runsettings + condition: not(eq(variables['Build.Reason'], 'PullRequest')) + - template: ./templates/run-unit-tests.yaml parameters: platform: x64 diff --git a/build/pipelines/azure-pipelines.release.test.yaml b/build/pipelines/azure-pipelines.release.test.yaml index 84ee1fc9..ca512393 100644 --- a/build/pipelines/azure-pipelines.release.test.yaml +++ b/build/pipelines/azure-pipelines.release.test.yaml @@ -1,10 +1,13 @@ # -# Continuous Integration (CI) - Internal -# This pipeline builds and validate the app for all supported architectures, in a production -# configuration. This pipeline relies on Microsoft-internal resources to run. +# Release +# This pipeline builds a version of the app in a production configuration to be released to the +# Store and the Windows image. This pipeline relies on Microsoft-internal resources to run. # -trigger: none +trigger: +- master +- release/* +- feature/* pr: none name: 0.$(Date:yyMM).$(DayOfMonth)$(Rev:rr).0 @@ -19,15 +22,20 @@ jobs: parameters: platform: x86 isPublicRelease: true + condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/build-app-internal.yaml parameters: platform: ARM isPublicRelease: true + condition: not(eq(variables['Build.Reason'], 'PullRequest')) -- template: ./templates/run-ui-tests.yaml +- template: ./templates/run-unit-tests.yaml parameters: platform: x64 - runsettingsFileName: CalculatorUITests.release.runsettings + +- template: ./templates/run-unit-tests.yaml + parameters: + platform: x86 - template: ./templates/package-appxbundle.yaml diff --git a/build/pipelines/azure-pipelines.release.yaml b/build/pipelines/azure-pipelines.release.yaml index ba9de01c..05eec0b3 100644 --- a/build/pipelines/azure-pipelines.release.yaml +++ b/build/pipelines/azure-pipelines.release.yaml @@ -4,13 +4,6 @@ # Store and the Windows image. This pipeline relies on Microsoft-internal resources to run. # -schedules: -- cron: "0 7 * * *" - displayName: Daily midnight build - branches: - include: - - master - trigger: none pr: none @@ -26,27 +19,20 @@ jobs: - template: ./templates/build-app-internal.yaml parameters: platform: x64 + isPublicRelease: true - template: ./templates/build-app-internal.yaml parameters: platform: x86 + isPublicRelease: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/build-app-internal.yaml parameters: platform: ARM + isPublicRelease: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) -- template: ./templates/run-ui-tests.yaml - parameters: - platform: x64 - runsettingsFileName: CalculatorUITests.release.runsettings - -- template: ./templates/run-ui-tests.yaml - parameters: - platform: x86 - runsettingsFileName: CalculatorUITests.release.runsettings - - template: ./templates/run-unit-tests.yaml parameters: platform: x64 diff --git a/build/pipelines/templates/build-single-architecture.yaml b/build/pipelines/templates/build-single-architecture.yaml index e35ca0cb..09d29a05 100644 --- a/build/pipelines/templates/build-single-architecture.yaml +++ b/build/pipelines/templates/build-single-architecture.yaml @@ -23,11 +23,10 @@ steps: displayName: Set version number in AppxManifest inputs: filePath: $(Build.SourcesDirectory)\build\scripts\UpdateAppxManifestVersion.ps1 - arguments: versionArgs ${{ if eq(parameters.isPublicRelease, true) }}: - versionArgs: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber) -MinVersion 10.0.22000.0' + arguments: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber) -MinVersion 10.0.22000.0' ${{ if eq(parameters.isPublicRelease, false) }}: - versionArgs: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber)' + arguments: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber)' - task: VSBuild@1 displayName: 'Build solution src/Calculator.sln' diff --git a/build/scripts/UpdateAppxManifestVersion.ps1 b/build/scripts/UpdateAppxManifestVersion.ps1 index e20b9203..64ced98c 100644 --- a/build/scripts/UpdateAppxManifestVersion.ps1 +++ b/build/scripts/UpdateAppxManifestVersion.ps1 @@ -26,7 +26,7 @@ param( [ValidateScript({[version]$_})] [Parameter(Mandatory)] [string] - $Version + $Version, [ValidateScript({[version]$_})] [Parameter(Mandatory=$false)]