Skip to content

Commit

Permalink
Add manual patch number to the versioning (#1750)
Browse files Browse the repository at this point in the history
  • Loading branch information
jevansaks authored Dec 14, 2019
1 parent 956f1ec commit 38b359c
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 26 deletions.
3 changes: 2 additions & 1 deletion build/AzurePipelinesTemplates/MUX-CreateNugetPackage-Job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ parameters:
buildFlavor: Release
signConfig: ''
useReleaseTag: 'false'
prereleaseVersionTag: 'prerelease'

jobs:
- job: ${{ parameters.jobName }}
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
Contents: '**\Microsoft.UI.Xaml*.appx'

- powershell: |
$prereleaseTag = "prerelease"
$prereleaseTag = "${{ parameters.prereleaseVersionTag }}"
if ("${{ parameters.useReleaseTag}}" -eq [bool]::TrueString) { $prereleaseTag = "" }
& "$env:Build_SourcesDirectory\build\NuSpecs\build-nupkg.ps1" `
Expand Down
1 change: 1 addition & 0 deletions build/MUX-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
parameters:
jobName: CreateNugetPackage
dependsOn: Build
prereleaseVersionTag: ci

# Build solution that depends on nuget package
- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
Expand Down
1 change: 1 addition & 0 deletions build/MUX-PGOInstrument.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
parameters:
jobName: CreateNugetPackage
dependsOn: Build
prereleaseVersionTag: pgo

# Build solution that depends on nuget package
- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
Expand Down
1 change: 1 addition & 0 deletions build/MUX-PR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
jobName: CreateNugetPackage
dependsOn: Build
primaryBuildArch: x64
prereleaseVersionTag: pr

- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions build/MUX-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ jobs:
dependsOn: SignBinariesAndPublishSymbols
signConfig: '$(Build.SourcesDirectory)\build\NuGetSignConfig.xml'
useReleaseTag: '$(MUXFinalRelease)'
prereleaseVersionTag: prerelease

# Build solution that depends on nuget package
- template: AzurePipelinesTemplates\MUX-NugetReleaseTest-Job.yml
Expand Down
10 changes: 5 additions & 5 deletions build/NuSpecs/MUXControls-Nuget-FrameworkPackage.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
<Import Project="$(MSBuildThisFileDirectory)\MicrosoftUIXamlVersion.props"/>
<Import Project="$(MSBuildThisFileDirectory)\Common.targets"/>
<ItemGroup>
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\x86\Release\Microsoft.UI.Xaml.2.3.appx">
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\x86\Release\Microsoft.UI.Xaml.2.4.appx">
<Architecture>x86</Architecture>
<Version>$(MicrosoftUIXamlAppxVersion)</Version>
<Publisher>'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'</Publisher>
</AppxPackageRegistration>
<!-- Some C++/CX projects use Platform=Win32 instead of Platform=x86 -->
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\x86\Release\Microsoft.UI.Xaml.2.3.appx">
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\x86\Release\Microsoft.UI.Xaml.2.4.appx">
<Architecture>Win32</Architecture>
<Version>$(MicrosoftUIXamlAppxVersion)</Version>
<Publisher>'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'</Publisher>
</AppxPackageRegistration>
</ItemGroup>
<ItemGroup>
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.3.appx">
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.4.appx">
<Architecture>x64</Architecture>
<Version>$(MicrosoftUIXamlAppxVersion)</Version>
<Publisher>'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'</Publisher>
</AppxPackageRegistration>
</ItemGroup>
<ItemGroup>
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\arm\Release\Microsoft.UI.Xaml.2.3.appx">
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\arm\Release\Microsoft.UI.Xaml.2.4.appx">
<Architecture>arm</Architecture>
<Version>$(MicrosoftUIXamlAppxVersion)</Version>
<Publisher>'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'</Publisher>
</AppxPackageRegistration>
</ItemGroup>
<ItemGroup>
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\arm64\Release\Microsoft.UI.Xaml.2.3.appx">
<AppxPackageRegistration Include="$(MSBuildThisFileDirectory)..\tools\AppX\arm64\Release\Microsoft.UI.Xaml.2.4.appx">
<Architecture>arm64</Architecture>
<Version>$(MicrosoftUIXamlAppxVersion)</Version>
<Publisher>'CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US'</Publisher>
Expand Down
24 changes: 12 additions & 12 deletions build/NuSpecs/build-nupkg.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,21 @@ else
[xml]$customProps = (Get-Content ..\..\version.props)
$versionMajor = $customProps.GetElementsByTagName("MUXVersionMajor").'#text'
$versionMinor = $customProps.GetElementsByTagName("MUXVersionMinor").'#text'
$versionPatch = $customProps.GetElementsByTagName("MUXVersionPatch").'#text'

if ((!$versionMajor) -or (!$versionMinor))
if ((!$versionMajor) -or (!$versionMinor) -or (!$versionPatch))
{
Write-Error "Expected MUXVersionMajor and MUXVersionMinor tags to be in version.props file"
Write-Error "Expected MUXVersionMajor, MUXVersionMinor, and MUXVersionPatch tags to be in version.props file"
Exit 1
}

$version = "$versionMajor.$versionMinor"

$version = "$versionMajor.$versionMinor.$versionPatch"

Write-Verbose "Version = $version"
}

if ($prereleaseversion)
{
$versiondate = $DateOverride
if (-not $versiondate)
{
Expand All @@ -57,14 +63,8 @@ else
$versiondate += ($pstTime).ToString("yyMMdd")
}

$version += "." + $versiondate + "$subversion"

Write-Verbose "Version = $version"
}

if ($prereleaseversion)
{
$version = "$version-$prereleaseversion"
$version = "$version-$prereleaseversion.$versiondate$subversion"

}

if (!(Test-Path $OutputDir)) { mkdir $OutputDir }
Expand Down
4 changes: 2 additions & 2 deletions dev/inc/BuildMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#ifdef _DEBUG
// NOTE: This could be "Microsoft.UI.Xaml.Debug" if we wanted to have Debug framework packages be distinct and
// installed side-by-side on a machine.
#define MUXCONTROLS_PACKAGE_NAME L"Microsoft.UI.Xaml.2.3"
#define MUXCONTROLS_PACKAGE_NAME L"Microsoft.UI.Xaml.2.4"
#else
#define MUXCONTROLS_PACKAGE_NAME L"Microsoft.UI.Xaml.2.3"
#define MUXCONTROLS_PACKAGE_NAME L"Microsoft.UI.Xaml.2.4"
#endif
4 changes: 2 additions & 2 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ The WinUI team has two major efforts underway:

## WinUI 2

The next release of WinUI 2 will be **WinUI 2.3**, ETA Q4 2019.
The next release of WinUI 2 will be **WinUI 2.4**, ETA Q1 2020.

2.3 will be an incremental release that includes new WinUI Xaml features and fixes for UWP apps on Windows 10. You can find a list of currently planned work in the [WinUI 2.3 milestone](https://github.com/microsoft/microsoft-ui-xaml/milestone/8).
2.4 will be an incremental release that includes new WinUI Xaml features and fixes for UWP apps on Windows 10. You can find a list of currently planned work in the [WinUI 2.3 milestone](https://github.com/microsoft/microsoft-ui-xaml/milestone/8).

For installation instructions see [Getting started with the Windows UI Library](https://docs.microsoft.com/uwp/toolkits/winui/getting-started).

Expand Down
7 changes: 4 additions & 3 deletions tools/PublishSymbols/PublishSymbols.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ Push-Location $PSScriptRoot
[xml]$customProps = (Get-Content ..\..\version.props)
$versionMajor = $customProps.GetElementsByTagName("MUXVersionMajor").'#text'
$versionMinor = $customProps.GetElementsByTagName("MUXVersionMinor").'#text'
$versionPatch = $customProps.GetElementsByTagName("MUXVersionPatch").'#text'

if ((!$versionMajor) -or (!$versionMinor))
if ((!$versionMajor) -or (!$versionMinor) -or (!$versionPatch))
{
Write-Error "Expected MUXVersionMajor and MUXVersionMinor tags to be in version.props file"
Write-Error "Expected MUXVersionMajor, MUXVersionMinor, and MUXVersionPatch tags to be in version.props file"
Exit 1
}

$buildVersion = $versionMajor + "." + $versionMinor + "." + $env:BUILD_BUILDNUMBER
$buildVersion = "$versionMajor.$versionMinor.$versionPatch.$env:BUILD_BUILDNUMBER"

Write-Host "Build = $buildVersion"

Expand Down
5 changes: 4 additions & 1 deletion version.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MUXVersionMajor>2</MUXVersionMajor>
<MUXVersionMinor>3</MUXVersionMinor>
<MUXVersionMinor>4</MUXVersionMinor>
<MUXVersionPatch>0</MUXVersionPatch>
<MUXVersionBuild Condition="$(MUXVersionBuild) == ''">0</MUXVersionBuild>
<MUXVersionRevision Condition="$(MUXVersionRevision) == ''">0</MUXVersionRevision>
</PropertyGroup>
Expand All @@ -13,6 +14,7 @@
%(PreprocessorDefinitions);
MUX_VERSION_MAJOR=$(MUXVersionMajor);
MUX_VERSION_MINOR=$(MUXVersionMinor);
MUX_VERSION_PATCH=$(MUXVersionPatch);
MUX_VERSION_BUILD=$(MUXVersionBuild);
MUX_VERSION_REVISION=$(MUXVersionRevision);
</PreprocessorDefinitions>
Expand All @@ -22,6 +24,7 @@
%(PreprocessorDefinitions);
MUX_VERSION_MAJOR=$(MUXVersionMajor);
MUX_VERSION_MINOR=$(MUXVersionMinor);
MUX_VERSION_PATCH=$(MUXVersionPatch);
MUX_VERSION_BUILD=$(MUXVersionBuild);
MUX_VERSION_REVISION=$(MUXVersionRevision);
</PreprocessorDefinitions>
Expand Down

0 comments on commit 38b359c

Please sign in to comment.