Skip to content

Commit a0b31b3

Browse files
authored
Updated build properties to produce stable package version. (#53)
* Updated build properties to produce stable package version. * Updated version building to use only CDP_BUILD_TYPE in conditions.
1 parent bbadd50 commit a0b31b3

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

build/NugetProperties.props

+18-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@
44
<Company>Microsoft</Company>
55
</PropertyGroup>
66

7-
<PropertyGroup Condition="'$(CDP_PATCH_NUMBER)'==''">
8-
<Version>1.9.9999</Version>
7+
<!-- Official Version -->
8+
<PropertyGroup>
9+
<MajorVersion>2</MajorVersion>
10+
<MinorVersion>0</MinorVersion>
11+
<PatchVersion>0</PatchVersion>
12+
</PropertyGroup>
13+
14+
<!-- Local Development -->
15+
<PropertyGroup Condition="'$(CDP_BUILD_TYPE)'==''">
16+
<MinorVersion>9</MinorVersion>
17+
<PatchVersion>9999</PatchVersion>
918
</PropertyGroup>
1019

11-
<PropertyGroup Condition="'$(CDP_PATCH_NUMBER)'!=''">
20+
<!-- Buddy builds -->
21+
<PropertyGroup Condition="'$(CDP_BUILD_TYPE)'!='' AND '$(CDP_BUILD_TYPE)'!='Official'">
1222
<!-- Note that CDP_PACKAGE_VERSION_NUMERIC uses format Major.Minor.MMddyyrrrr, which causes compile error CS7034 because .NET Core doesn't allow version numbers higher than 65534. -->
1323
<!-- CDP_PATCH_NUMBER is updated daily by the build system, the addition of a revision number makes the build number unique by the minute -->
1424
<!-- The revision number is the number of minutes since midnight [0, 1440) -->
@@ -19,7 +29,11 @@
1929
<MinutesSinceMidnight>$([MSBuild]::Divide($(TicksSinceMidnight), 600000000))</MinutesSinceMidnight>
2030
<Floored>$([System.Math]::Floor($(MinutesSinceMidnight)))</Floored>
2131
<Revision>$(Floored)</Revision>
22-
<Version>2.0.0-preview-$(CDP_PATCH_NUMBER)-$(Revision)</Version>
32+
<PreviewVersion>-preview-$(CDP_PATCH_NUMBER)-$(Revision)</PreviewVersion>
33+
</PropertyGroup>
34+
35+
<PropertyGroup>
36+
<Version>$(MajorVersion).$(MinorVersion).$(PatchVersion)$(PreviewVersion)</Version>
2337
</PropertyGroup>
2438

2539
</Project>

0 commit comments

Comments
 (0)