From 251248ee7de5ea99debb4ad443ea6dda6dbcae7a Mon Sep 17 00:00:00 2001 From: Matt Cooley Date: Wed, 8 Sep 2021 08:40:05 -0700 Subject: [PATCH] Add release appxmanifest (#1682) Currently, the copy of Package.appxmanifest in this repo is overwritten with a copy from an internal repo during release builds. This change adds the release version of Package.appxmanifest to this repo, to make it easier to maintain and keep it in sync with the copy used during development. --- .../azure-pipelines.ci-internal.yaml | 8 ++-- build/pipelines/azure-pipelines.release.yaml | 3 ++ .../templates/build-single-architecture.yaml | 17 ++++--- .../templates/package-appxbundle.yaml | 14 +----- src/Calculator/Calculator.csproj | 7 ++- src/Calculator/Package.Release.appxmanifest | 45 +++++++++++++++++++ 6 files changed, 69 insertions(+), 25 deletions(-) create mode 100644 src/Calculator/Package.Release.appxmanifest diff --git a/build/pipelines/azure-pipelines.ci-internal.yaml b/build/pipelines/azure-pipelines.ci-internal.yaml index 6683470..4fcaf62 100644 --- a/build/pipelines/azure-pipelines.ci-internal.yaml +++ b/build/pipelines/azure-pipelines.ci-internal.yaml @@ -16,19 +16,19 @@ jobs: - template: ./templates/build-single-architecture.yaml parameters: isReleaseBuild: true - useTestVersionOfInternalsPackage: true + useReleaseAppxManifest: false platform: x64 - template: ./templates/build-single-architecture.yaml parameters: isReleaseBuild: true - useTestVersionOfInternalsPackage: true + useReleaseAppxManifest: false platform: x86 - template: ./templates/build-single-architecture.yaml parameters: isReleaseBuild: true - useTestVersionOfInternalsPackage: true + useReleaseAppxManifest: false platform: ARM - template: ./templates/run-ui-tests.yaml @@ -50,5 +50,3 @@ jobs: platform: x86 - template: ./templates/package-appxbundle.yaml - parameters: - useTestVersionOfInternalsPackage: true diff --git a/build/pipelines/azure-pipelines.release.yaml b/build/pipelines/azure-pipelines.release.yaml index 1c4725c..05240f3 100644 --- a/build/pipelines/azure-pipelines.release.yaml +++ b/build/pipelines/azure-pipelines.release.yaml @@ -20,17 +20,20 @@ jobs: parameters: platform: x64 isReleaseBuild: true + useReleaseAppxmanifest: true - template: ./templates/build-single-architecture.yaml parameters: platform: x86 isReleaseBuild: true + useReleaseAppxmanifest: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/build-single-architecture.yaml parameters: platform: ARM isReleaseBuild: true + useReleaseAppxmanifest: true condition: not(eq(variables['Build.Reason'], 'PullRequest')) - template: ./templates/run-unit-tests.yaml diff --git a/build/pipelines/templates/build-single-architecture.yaml b/build/pipelines/templates/build-single-architecture.yaml index fb3e60f..be14374 100644 --- a/build/pipelines/templates/build-single-architecture.yaml +++ b/build/pipelines/templates/build-single-architecture.yaml @@ -2,7 +2,7 @@ parameters: isReleaseBuild: false - useTestVersionOfInternalsPackage: false + useReleaseAppxManifest: false platform: '' condition: '' @@ -16,9 +16,15 @@ jobs: BuildConfiguration: Release BuildPlatform: ${{ parameters.platform }} ${{ if eq(parameters.isReleaseBuild, true) }}: - ExtraMSBuildArgs: '/p:IsStoreBuild=true' + ${{ if eq(parameters.useReleaseAppxManifest, true) }}: + ExtraMSBuildArgs: '/p:IsStoreBuild=true /p:UseReleaseAppxManifest=true' + ${{ if eq(parameters.useReleaseAppxManifest, false) }}: + ExtraMSBuildArgs: '/p:IsStoreBuild=true' ${{ if eq(parameters.isReleaseBuild, false) }}: - ExtraMSBuildArgs: '' + ${{ if eq(parameters.useReleaseAppxManifest, true) }}: + ExtraMSBuildArgs: '/p:UseReleaseAppxManifest=true' + ${{ if eq(parameters.useReleaseAppxManifest, false) }}: + ExtraMSBuildArgs: '' steps: - checkout: self fetchDepth: 1 @@ -31,10 +37,7 @@ jobs: downloadDirectory: $(Build.SourcesDirectory) vstsFeed: WindowsInboxApps vstsFeedPackage: calculator-internals - ${{ if eq(parameters.useTestVersionOfInternalsPackage, false) }}: - vstsPackageVersion: 0.0.66 - ${{ if eq(parameters.useTestVersionOfInternalsPackage, true) }}: - vstsPackageVersion: 0.0.65 + vstsPackageVersion: 0.0.67 - task: NuGetToolInstaller@1 displayName: Use NuGet 5.x diff --git a/build/pipelines/templates/package-appxbundle.yaml b/build/pipelines/templates/package-appxbundle.yaml index 277c94a..d546588 100644 --- a/build/pipelines/templates/package-appxbundle.yaml +++ b/build/pipelines/templates/package-appxbundle.yaml @@ -4,7 +4,7 @@ parameters: signBundle: false - useTestVersionOfInternalsPackage: false + createStoreBrokerPackages: false jobs: - job: Package @@ -43,17 +43,7 @@ jobs: downloadDirectory: $(Build.SourcesDirectory) vstsFeed: WindowsInboxApps vstsFeedPackage: calculator-internals - vstsPackageVersion: 0.0.66 - - - ${{ if eq(parameters.useTestVersionOfInternalsPackage, true) }}: - - task: UniversalPackages@0 - displayName: Download internals package - inputs: - command: download - downloadDirectory: $(Build.SourcesDirectory) - vstsFeed: WindowsInboxApps - vstsFeedPackage: calculator-internals - vstsPackageVersion: 0.0.65 + vstsPackageVersion: 0.0.67 - task: PowerShell@2 displayName: Generate AppxBundle mapping diff --git a/src/Calculator/Calculator.csproj b/src/Calculator/Calculator.csproj index 7c728fa..f85589c 100644 --- a/src/Calculator/Calculator.csproj +++ b/src/Calculator/Calculator.csproj @@ -249,7 +249,12 @@ - + + + Designer + + + Designer diff --git a/src/Calculator/Package.Release.appxmanifest b/src/Calculator/Package.Release.appxmanifest new file mode 100644 index 0000000..8008ca3 --- /dev/null +++ b/src/Calculator/Package.Release.appxmanifest @@ -0,0 +1,45 @@ + + + + + + ms-resource:AppStoreName + Microsoft Corporation + Assets\CalculatorStoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + Assets\CalculatorAppList.png + + + + + Assets\CalculatorAppList.png + + + + + + + + +