Add support for building final preview packages
authorWes Haggard <Wes.Haggard@microsoft.com>
Wed, 28 Feb 2018 00:38:25 +0000 (16:38 -0800)
committerWes Haggard <Wes.Haggard@microsoft.com>
Wed, 28 Feb 2018 01:30:30 +0000 (17:30 -0800)
This enables us to build packages with a preview label
but not include the build number.

Commit migrated from https://github.com/dotnet/core-setup/commit/ff406ef6a9ab3a903bd3414ab6cb6910faffd030

src/installer/BranchInfo.props
src/installer/pkg/projects/dir.targets

index ebf9842..74b8820 100644 (file)
@@ -3,9 +3,14 @@
     <MajorVersion>2</MajorVersion>
     <MinorVersion>1</MinorVersion>
     <PatchVersion>0</PatchVersion>
+
     <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
+
     <PreReleaseLabel Condition="'$(PackageVersionStamp)' != ''">$(PackageVersionStamp)</PreReleaseLabel>
     <PreReleaseLabel Condition="'$(PreReleaseLabel)' == ''">preview2</PreReleaseLabel>
+    <IncludePreReleaseLabelInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true' or '$(PackageVersionStamp)' != ''">true</IncludePreReleaseLabelInPackageVersion>
+    <IncludeBuildNumberInPackageVersion Condition="'$(StabilizePackageVersion)' != 'true'">true</IncludeBuildNumberInPackageVersion>
+
     <ReleaseSuffix>$(PreReleaseLabel)</ReleaseSuffix>
     <ReleaseBrandSuffix>Preview 2</ReleaseBrandSuffix>
     <Channel>master</Channel>
index 9d584b0..a34982c 100644 (file)
@@ -11,7 +11,7 @@
       If we are stabilizing set the StableVersion property for the packages.
       Needs to happen in dir.targets to allow all the pkgproj's to set Version property first.
     -->
-    <StableVersion Condition="'$(StabilizePackageVersion)' =='true'">$(Version)</StableVersion>
+    <StableVersion Condition="'$(IncludePreReleaseLabelInPackageVersion)' != 'true'">$(Version)</StableVersion>
   </PropertyGroup>
 
   <!--