mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
Test to bump minVerson only for release pipeline
This commit is contained in:
parent
1fc360e31d
commit
af1c7a8b6e
4 changed files with 55 additions and 1 deletions
33
build/pipelines/azure-pipelines.release.test.yaml
Normal file
33
build/pipelines/azure-pipelines.release.test.yaml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
|
||||||
|
trigger: none
|
||||||
|
pr: none
|
||||||
|
|
||||||
|
name: 0.$(Date:yyMM).$(DayOfMonth)$(Rev:rr).0
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
- template: ./templates/build-app-internal.yaml
|
||||||
|
parameters:
|
||||||
|
platform: x64
|
||||||
|
isPublicRelease: true
|
||||||
|
|
||||||
|
- template: ./templates/build-app-internal.yaml
|
||||||
|
parameters:
|
||||||
|
platform: x86
|
||||||
|
isPublicRelease: true
|
||||||
|
|
||||||
|
- template: ./templates/build-app-internal.yaml
|
||||||
|
parameters:
|
||||||
|
platform: ARM
|
||||||
|
isPublicRelease: true
|
||||||
|
|
||||||
|
- template: ./templates/run-ui-tests.yaml
|
||||||
|
parameters:
|
||||||
|
platform: x64
|
||||||
|
runsettingsFileName: CalculatorUITests.release.runsettings
|
||||||
|
|
||||||
|
- template: ./templates/package-appxbundle.yaml
|
|
@ -6,6 +6,7 @@
|
||||||
parameters:
|
parameters:
|
||||||
platform: ''
|
platform: ''
|
||||||
condition: ''
|
condition: ''
|
||||||
|
isPublicRelease: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
- job: Build${{ parameters.platform }}
|
- job: Build${{ parameters.platform }}
|
||||||
|
@ -32,6 +33,7 @@ jobs:
|
||||||
- template: ./build-single-architecture.yaml
|
- template: ./build-single-architecture.yaml
|
||||||
parameters:
|
parameters:
|
||||||
extraMsBuildArgs: '/p:IsStoreBuild=true'
|
extraMsBuildArgs: '/p:IsStoreBuild=true'
|
||||||
|
isPublicRelease: ${{ parameters.isPublicRelease }}
|
||||||
|
|
||||||
- task: PublishSymbols@2
|
- task: PublishSymbols@2
|
||||||
displayName: Publish symbols
|
displayName: Publish symbols
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
extraMsBuildArgs: ''
|
extraMsBuildArgs: ''
|
||||||
|
isPublicRelease: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- task: NuGetToolInstaller@1
|
- task: NuGetToolInstaller@1
|
||||||
|
@ -22,7 +23,11 @@ steps:
|
||||||
displayName: Set version number in AppxManifest
|
displayName: Set version number in AppxManifest
|
||||||
inputs:
|
inputs:
|
||||||
filePath: $(Build.SourcesDirectory)\build\scripts\UpdateAppxManifestVersion.ps1
|
filePath: $(Build.SourcesDirectory)\build\scripts\UpdateAppxManifestVersion.ps1
|
||||||
arguments: '-AppxManifest $(Build.SourcesDirectory)\src\Calculator\Package.appxmanifest -Version $(Build.BuildNumber)'
|
arguments: versionArgs
|
||||||
|
${{ if eq(parameters.isPublicRelease, true) }}:
|
||||||
|
versionArgs: '-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)'
|
||||||
|
|
||||||
- task: VSBuild@1
|
- task: VSBuild@1
|
||||||
displayName: 'Build solution src/Calculator.sln'
|
displayName: 'Build solution src/Calculator.sln'
|
||||||
|
|
|
@ -11,6 +11,9 @@
|
||||||
.PARAMETER Version
|
.PARAMETER Version
|
||||||
The version number to write into the file.
|
The version number to write into the file.
|
||||||
|
|
||||||
|
.PARAMETER MinVersion
|
||||||
|
The MinVersion to write to TargetDeviceFamily element in the file.
|
||||||
|
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
Update-AppxManifestVersion -AppxManifest "C:\App\Package.appxmanifest" -Version "3.2.1.0"
|
Update-AppxManifestVersion -AppxManifest "C:\App\Package.appxmanifest" -Version "3.2.1.0"
|
||||||
#>
|
#>
|
||||||
|
@ -24,8 +27,19 @@ param(
|
||||||
[Parameter(Mandatory)]
|
[Parameter(Mandatory)]
|
||||||
[string]
|
[string]
|
||||||
$Version
|
$Version
|
||||||
|
|
||||||
|
[ValidateScript({[version]$_})]
|
||||||
|
[Parameter(Mandatory=$false)]
|
||||||
|
[string]
|
||||||
|
$MinVersion
|
||||||
)
|
)
|
||||||
|
|
||||||
$xmlDoc = [XML](Get-Content $AppxManifest)
|
$xmlDoc = [XML](Get-Content $AppxManifest)
|
||||||
$xmlDoc.Package.Identity.setAttribute("Version", $Version);
|
$xmlDoc.Package.Identity.setAttribute("Version", $Version);
|
||||||
|
|
||||||
|
if($MinVersion)
|
||||||
|
{
|
||||||
|
$xmlDoc.Package.Dependencies.TargetDeviceFamily.setAttribute("MinVersion", $MinVersion);
|
||||||
|
}
|
||||||
|
|
||||||
$xmlDoc.Save($AppxManifest)
|
$xmlDoc.Save($AppxManifest)
|
Loading…
Add table
Add a link
Reference in a new issue