From 1540491e62f88c1703e050a4279e576c65e8a35e Mon Sep 17 00:00:00 2001
From: Ryan Fu <69221034+ryfu-msft@users.noreply.github.com>
Date: Fri, 18 Mar 2022 12:11:24 -0700
Subject: [PATCH] Update version in release build and remove preview labels
(#240)
---
pipelines/azure-pipelines.release.yml | 9 +++++----
pipelines/azure-pipelines.yml | 13 ++++++-------
src/WingetCreateCLI/WingetCreateCLI.csproj | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/pipelines/azure-pipelines.release.yml b/pipelines/azure-pipelines.release.yml
index 77d07eaf..5e5d2930 100644
--- a/pipelines/azure-pipelines.release.yml
+++ b/pipelines/azure-pipelines.release.yml
@@ -31,7 +31,7 @@ jobs:
- powershell: |
[xml]$project = get-content "$(workingDirectory)/WingetCreateCLI/WingetCreateCLI.csproj"
$version = @($project.Project.PropertyGroup)[0].Version
- echo "##vso[task.setvariable variable=majorMinorBuildVersion;isOutput=true]$version"
+ echo "##vso[task.setvariable variable=majorMinorVersion;isOutput=true]$version"
name: GetVersionStep
displayName: Get version from CLI project
@@ -39,8 +39,9 @@ jobs:
displayName: Build
dependsOn: GetVersion
variables:
- majorMinorBuildVersion: $[dependencies.GetVersion.outputs['GetVersionStep.majorMinorBuildVersion']]
- version: "$(majorMinorBuildVersion)"
+ majorMinorVersion: $[dependencies.GetVersion.outputs['GetVersionStep.majorMinorVersion']]
+ buildVersion: $[counter(variables['majorMinorVersion'], 1)]
+ version: "$(majorMinorVersion).$(buildVersion).0"
appxBundleFile: "Microsoft.WindowsPackageManagerManifestCreator_$(version)_8wekyb3d8bbwe.msixbundle"
appxBundlePath: '$(appxPackageDir)\$(appxBundleFile)'
exeDirSelfContained: '$(appxPackageDir)\selfcontained'
@@ -233,7 +234,7 @@ jobs:
skipComponentGovernanceDetection: ${{ true }}
manifestVersion: $[dependencies.Build.outputs['OutputVersionStep.manifestVersion']]
appxBundleFile: $[dependencies.Build.outputs['OutputVersionStep.appxBundleFile']]
- packageUrl: "https://github.com/microsoft/winget-create/releases/download/v$(manifestVersion)-preview/$(appxBundleFile)"
+ packageUrl: "https://github.com/microsoft/winget-create/releases/download/v$(manifestVersion)/$(appxBundleFile)"
steps:
- checkout: none
diff --git a/pipelines/azure-pipelines.yml b/pipelines/azure-pipelines.yml
index 68eba115..4c460b88 100644
--- a/pipelines/azure-pipelines.yml
+++ b/pipelines/azure-pipelines.yml
@@ -42,7 +42,7 @@ jobs:
- powershell: |
[xml]$project = get-content "$(workingDirectory)/WingetCreateCLI/WingetCreateCLI.csproj"
$version = $project.Project.PropertyGroup.Version
- echo "##vso[task.setvariable variable=majorMinorBuildVersion;isOutput=true]$version"
+ echo "##vso[task.setvariable variable=majorMinorVersion;isOutput=true]$version"
name: GetVersionStep
displayName: Get version from CLI project
@@ -50,15 +50,14 @@ jobs:
displayName: Build
dependsOn: GetVersion
variables:
- majorMinorBuildVersion: $[dependencies.GetVersion.outputs['GetVersionStep.majorMinorBuildVersion']]
-
+ majorMinorVersion: $[dependencies.GetVersion.outputs['GetVersionStep.majorMinorVersion']]
# Only update counter for non-PR builds, otherwise just use 0 for the revision
${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- revision: 0
+ buildVersion: 0
${{ if not(eq(variables['Build.Reason'], 'PullRequest')) }}:
- revision: $[counter(variables['majorMinorBuildVersion'], 1)]
+ buildVersion: $[counter(variables['majorMinorVersion'], 1)]
- version: "$(majorMinorBuildVersion).$(revision)"
+ version: "$(majorMinorVersion).$(buildVersion).0"
appxBundlePath: '$(appxPackageDir)\Microsoft.WindowsPackageManagerManifestCreator_$(version)_8wekyb3d8bbwe.msixbundle'
pool:
vmImage: $(vmImageName)
@@ -136,6 +135,6 @@ jobs:
displayName: Run Tests
inputs:
testSelector: "testAssemblies"
- testAssemblyVer2: 'src\WingetCreateTests\WingetCreateTests\bin\$(buildPlatform)\$(buildConfiguration)\net5.0-windows10.0.17763.0\WingetCreateTests.dll'
+ testAssemblyVer2: 'src\WingetCreateTests\WingetCreateTests\bin\$(buildPlatform)\$(buildConfiguration)\net5.0-windows10.0.22000.0\WingetCreateTests.dll'
runSettingsFile: 'src\WingetCreateTests\WingetCreateTests\Test.runsettings'
overrideTestrunParameters: '-WingetPkgsTestRepoOwner microsoft -WingetPkgsTestRepo winget-pkgs-submission-test -GitHubAppPrivateKey "$(GitHubApp_PrivateKey)"'
diff --git a/src/WingetCreateCLI/WingetCreateCLI.csproj b/src/WingetCreateCLI/WingetCreateCLI.csproj
index 4c2c10e5..2414ab2b 100644
--- a/src/WingetCreateCLI/WingetCreateCLI.csproj
+++ b/src/WingetCreateCLI/WingetCreateCLI.csproj
@@ -5,7 +5,7 @@
net5.0-windows10.0.22000.0
WingetCreateCLI
Microsoft.WingetCreateCLI
- 1.0.0
+ 1.0
x64;x86
win-x64;win-x86
true