fix stable package proj versioning support (#58474)
authorAnirudh Agnihotry <anirudhagnihotry098@gmail.com>
Wed, 1 Sep 2021 17:31:25 +0000 (10:31 -0700)
committerGitHub <noreply@github.com>
Wed, 1 Sep 2021 17:31:25 +0000 (10:31 -0700)
src/coreclr/.nuget/Directory.Build.props
src/mono/nuget/Directory.Build.props

index cff00f4..876bcc6 100644 (file)
     <SkipIndexCheck>true</SkipIndexCheck>
 
     <!-- Central place to set the versions of all nuget packages produced in the repo -->
-    <PackageVersion Condition="'$(PackageVersion)' == ''">6.0.0</PackageVersion>
-    <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
+    <PackageVersion Condition="'$(PackageVersion)' == ''">$(ProductVersion)</PackageVersion>
+    <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == '' and '$(PreReleaseVersionLabel)' != 'servicing'">$(PackageVersion)</StableVersion>
+    <StableVersion Condition="($(MSBuildProjectName.Contains('Private')) or $(MSBuildProjectName.Contains('Experimental')) or $(MSBuildProjectName.Contains('Transport'))) and '$(MSBuildProjectExtension)' == '.pkgproj'"></StableVersion>
+  </PropertyGroup>
+
+  <PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing'">
+    <IsShipping>false</IsShipping>
   </PropertyGroup>
 
   <ItemGroup>
index e4a7e0f..7b96c76 100644 (file)
@@ -14,8 +14,9 @@
     <SkipIndexCheck>true</SkipIndexCheck>
     
     <!-- Central place to set the versions of all nuget packages produced in the repo -->
-    <PackageVersion Condition="'$(ProductVersion)' == ''">6.0.0</PackageVersion>
+    <PackageVersion Condition="'$(PackageVersion)' == ''">$(ProductVersion)</PackageVersion>
     <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
+    <StableVersion Condition="($(MSBuildProjectName.Contains('Private')) or $(MSBuildProjectName.Contains('Transport'))) and '$(MSBuildProjectExtension)' == '.pkgproj'"></StableVersion>
   </PropertyGroup>
 
   <ItemGroup>