Skip to content

Commit

Permalink
Update version in release build and remove preview labels (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft authored Mar 18, 2022
1 parent f7c62ad commit 1540491
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
9 changes: 5 additions & 4 deletions pipelines/azure-pipelines.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ 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
- job: Build
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'
Expand Down Expand Up @@ -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

Expand Down
13 changes: 6 additions & 7 deletions pipelines/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,22 @@ 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
- job: Build
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)
Expand Down Expand Up @@ -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)"'
2 changes: 1 addition & 1 deletion src/WingetCreateCLI/WingetCreateCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<TargetFramework>net5.0-windows10.0.22000.0</TargetFramework>
<AssemblyName>WingetCreateCLI</AssemblyName>
<RootNamespace>Microsoft.WingetCreateCLI</RootNamespace>
<Version>1.0.0</Version>
<Version>1.0</Version>
<Platforms>x64;x86</Platforms>
<RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down

0 comments on commit 1540491

Please sign in to comment.