Change versioning schema to match Roslyn
This commit is contained in:
Родитель
1d81f8e5e7
Коммит
9bf3bdc925
|
@ -1,37 +1,7 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>1.1.1</AssemblyVersion>
|
||||
<IsReleaseVersion>false</IsReleaseVersion>
|
||||
<AssemblyVersion>1.1.0</AssemblyVersion>
|
||||
<NuGetMoniker>rc3</NuGetMoniker>
|
||||
</PropertyGroup>
|
||||
|
||||
<Choose>
|
||||
<When Condition="$(BUILD_BUILDNUMBER) == ''">
|
||||
<PropertyGroup>
|
||||
<NuGetVersionSuffix>beta1</NuGetVersionSuffix>
|
||||
<BuildVersion>$(AssemblyVersion).0</BuildVersion>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<ShortBuildNumber>$(BUILD_BUILDNUMBER.Substring(3))</ShortBuildNumber>
|
||||
<NuGetVersionSuffix>beta1-$(ShortBuildNumber.Split('.')[0])-$(ShortBuildNumber.Split('.')[1].PadLeft(2,'0'))</NuGetVersionSuffix>
|
||||
<BuildVersion>$(AssemblyVersion).$(ShortBuildNumber.Split('.')[0])</BuildVersion>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(IsReleaseVersion)' == 'true'" >
|
||||
<PropertyGroup>
|
||||
<NuGetVersion>$(AssemblyVersion)</NuGetVersion>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<NuGetVersion>$(AssemblyVersion)-$(NuGetVersionSuffix)</NuGetVersion>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="..\Toolset\Version.props"/>
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
|
||||
|
||||
<!--
|
||||
|
||||
Requires the following properties to be set:
|
||||
AssemblyVersion
|
||||
NuGetMoniker (empty for release build)
|
||||
|
||||
Defines the following properties:
|
||||
BuildVersion
|
||||
NuGetVersion
|
||||
|
||||
-->
|
||||
|
||||
<Choose>
|
||||
<When Condition="$(BUILD_BUILDNUMBER) == ''">
|
||||
<PropertyGroup>
|
||||
<NuGetMoniker>dev</NuGetMoniker>
|
||||
<NuGetVersionSuffix>dev</NuGetVersionSuffix>
|
||||
<BuildVersion>$(AssemblyVersion).0</BuildVersion>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<BuildNumberFiveDigitDateStamp>$([MSBuild]::Subtract($(BUILD_BUILDNUMBER.Split('.')[0].Substring(3).Trim()), 8800))</BuildNumberFiveDigitDateStamp>
|
||||
<BuildNumberBuildOfTheDayPadded>$(BUILD_BUILDNUMBER.Split('.')[1].PadLeft(2,'0'))</BuildNumberBuildOfTheDayPadded>
|
||||
<NuGetVersionSuffix>$(NuGetMoniker)-$(BuildNumberFiveDigitDateStamp)-$(BuildNumberBuildOfTheDayPadded)</NuGetVersionSuffix>
|
||||
<BuildVersion>$(AssemblyVersion).$(BuildNumberFiveDigitDateStamp)</BuildVersion>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="'$(NuGetMoniker)' == ''" >
|
||||
<PropertyGroup>
|
||||
<NuGetVersion>$(AssemblyVersion)</NuGetVersion>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<NuGetVersion>$(AssemblyVersion)-$(NuGetVersionSuffix)</NuGetVersion>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче