forked from dotnet/aspnetcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.props
99 lines (79 loc) · 6.83 KB
/
version.props
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<Project>
<PropertyGroup>
<AspNetCoreMajorVersion>3</AspNetCoreMajorVersion>
<AspNetCoreMinorVersion>0</AspNetCoreMinorVersion>
<AspNetCorePatchVersion>0</AspNetCorePatchVersion>
<PreReleasePreviewNumber>4</PreReleasePreviewNumber>
<PreReleaseLabel>preview$(PreReleasePreviewNumber)</PreReleaseLabel>
<PreReleaseBrandingLabel>Preview $(PreReleasePreviewNumber)</PreReleaseBrandingLabel>
<ExperimentalVersionPrefix>0.3.$(AspNetCorePatchVersion)</ExperimentalVersionPrefix>
<BlazorComponentsVersionPrefix>0.9.$(AspNetCorePatchVersion)</BlazorComponentsVersionPrefix>
<VersionPrefix>$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$(AspNetCorePatchVersion)</VersionPrefix>
<!-- ANCM versioning is intentionally 10 + AspNetCoreMajorVersion because earlier versions of ANCM shipped as 8.x. -->
<AspNetCoreModuleVersionMajor>1$(AspNetCoreMajorVersion)</AspNetCoreModuleVersionMajor>
<AspNetCoreModuleVersionMinor>$(AspNetCoreMinorVersion)</AspNetCoreModuleVersionMinor>
<AspNetCoreModuleVersionRevision>$(AspNetCorePatchVersion)</AspNetCoreModuleVersionRevision>
<OfficialBuildId Condition="'$(OfficialBuildId)' == ''">$(BUILD_BUILDNUMBER)</OfficialBuildId>
<OfficialBuildId Condition="'$(OfficialBuildId)' == '' AND '$(IsOfficialBuild)' == 'true'">$([System.DateTime]::Now.ToString('yyyyMMdd')).1</OfficialBuildId>
</PropertyGroup>
<PropertyGroup Condition=" '$(OfficialBuildId)' != '' ">
<!-- This *mostly* implements core versioning. Spec: https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md -->
<_BuildNumber>$(OfficialBuildId)</_BuildNumber>
<!-- _BuildNumber from CI is assumed to have format "yyyyMMdd.r". -->
<_BuildNumberYY>$(_BuildNumber.Substring(2, 2))</_BuildNumberYY>
<_BuildNumberMM>$(_BuildNumber.Substring(4, 2))</_BuildNumberMM>
<_BuildNumberDD>$(_BuildNumber.Substring(6, 2))</_BuildNumberDD>
<_BuildNumberR>$(_BuildNumber.Substring(9))</_BuildNumberR>
<!-- yy * 1000 + mm * 50 + dd -->
<_BuildNumberShortDate>$([MSBuild]::Add($([MSBuild]::Add($([MSBuild]::Multiply($(_BuildNumberYY), 1000)), $([MSBuild]::Multiply($(_BuildNumberMM), 50)))), $(_BuildNumberDD)))</_BuildNumberShortDate>
<VersionSuffixBuildOfTheDay>$([System.Convert]::ToInt32($(_BuildNumberR)))</VersionSuffixBuildOfTheDay>
<VersionSuffixBuildOfTheDayPadded>$(VersionSuffixBuildOfTheDay.PadLeft(2, '0'))</VersionSuffixBuildOfTheDayPadded>
<!-- TODO: consider using semver 2.0 instead, when/if https://github.com/dotnet/core-setup/issues/4795 is resolved -->
<BuildNumberSuffix>$(_BuildNumberShortDate)-$(VersionSuffixBuildOfTheDayPadded)</BuildNumberSuffix>
<FileRevisionVersion>$(_BuildNumberShortDate)</FileRevisionVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(OfficialBuildId)' == '' ">
<BuildNumberSuffix>t000</BuildNumberSuffix>
<FileRevisionVersion>42424</FileRevisionVersion>
</PropertyGroup>
<PropertyGroup>
<VersionSuffix>$(PreReleaseLabel)-$(BuildNumberSuffix)</VersionSuffix>
<BrandingVersionSuffix>$(PreReleaseBrandingLabel) Build $(BuildNumberSuffix)</BrandingVersionSuffix>
<!-- Servicing builds have different characteristics for the way dependencies, baselines, and versions are handled. -->
<IsServicingBuild Condition=" '$(PreReleaseLabel)' == 'servicing' ">true</IsServicingBuild>
<!-- Run the build with /p:IsFinalBuild=true to produce the product with 'final' branding and versioning -->
<IsFinalBuild Condition=" '$(IsFinalBuild)' == '' ">false</IsFinalBuild>
<IncludePreReleaseLabelInPackageVersion>true</IncludePreReleaseLabelInPackageVersion>
<IncludePreReleaseLabelInPackageVersion Condition=" '$(IsFinalBuild)' == 'true' AND ('$(PreReleaseLabel)' == 'servicing' OR '$(PreReleaseLabel)' == 'rtm')">false</IncludePreReleaseLabelInPackageVersion>
<!-- The 'human friendly' version to display in installers. In pre-release builds, this might be "2.0.7 Preview 2 Build 12356". In final builds, it should be "2.0.7" -->
<PackageBrandingVersion>$(VersionPrefix)</PackageBrandingVersion>
<PackageBrandingVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(PackageBrandingVersion) $(BrandingVersionSuffix.Trim())</PackageBrandingVersion>
<!-- The version in files -->
<PackageVersion>$(VersionPrefix)</PackageVersion>
<PackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(VersionPrefix)-$(VersionSuffix)</PackageVersion>
<SharedFxName>Microsoft.AspNetCore.App</SharedFxName>
<SharedFxVersion>$(PackageVersion)</SharedFxVersion>
<TargetingPackName>Microsoft.AspNetCore.App.Ref</TargetingPackName>
<!-- TargetingPackVersionPrefix is used by projects, like .deb and .rpm, which use slightly different version formats. -->
<TargetingPackVersionPrefix>$(VersionPrefix)</TargetingPackVersionPrefix>
<!-- Targeting packs do not produce patch versions in servicing builds. No API changes are allowed in patches. -->
<TargetingPackVersionPrefix Condition="'$(IsServicingBuild)' == 'true'">$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).0</TargetingPackVersionPrefix>
<TargetingPackVersion>$(TargetingPackVersionPrefix)</TargetingPackVersion>
<TargetingPackVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(TargetingPackVersionPrefix)-$(VersionSuffix)</TargetingPackVersion>
<!-- Used to only produce targeting pack installers/packages once per major.minor. -->
<IsTargetingPackBuilding Condition="'$(IsServicingBuild)' == 'true' AND '$(DotNetBuildFromSource)' != 'true'">false</IsTargetingPackBuilding>
<!-- Experimental packages which are not truly supported yet. -->
<ExperimentalPackageVersion>$(ExperimentalVersionPrefix)</ExperimentalPackageVersion>
<ExperimentalPackageVersion Condition=" '$(IncludePreReleaseLabelInPackageVersion)' == 'true' ">$(ExperimentalVersionPrefix)-$(VersionSuffix)</ExperimentalPackageVersion>
<SharedFxCliBlobChannel>master</SharedFxCliBlobChannel>
<!-- This is used for error checking to ensure generated code and baselines are up to date when we increment the patch. -->
<PreviousAspNetCoreReleaseVersion Condition=" '$(AspNetCorePatchVersion)' != '0' ">$(AspNetCoreMajorVersion).$(AspNetCoreMinorVersion).$([MSBuild]::Subtract($(AspNetCorePatchVersion), 1))</PreviousAspNetCoreReleaseVersion>
</PropertyGroup>
<!-- Run 'dotnet msbuild version.props' to test changes to this file. -->
<Target Name="InspectVersionNumbers">
<Message Importance="High" Text="PackageVersion = '$(PackageVersion)'" />
<Message Importance="High" Text="PackageBrandingVersion = '$(PackageBrandingVersion)'" />
<Message Importance="High" Text="ExperimentalPackageVersion = '$(ExperimentalPackageVersion)'" />
<Message Importance="High" Text="SharedFxCliBlobChannel = '$(SharedFxCliBlobChannel)'" />
</Target>
</Project>