Skip to content

Commit ab29e9e

Browse files
authored
Do not use StabilizePackageVersion in project infra (#116152)
This property was originally just meant to be a repo global input, which was then used to set DotNetFinalVersionKind in Versions.props. That is then used in arcade to determine the package version. Where we are using StabilizePackageVersion, use DotNetFinalVersionKind.
1 parent 3be9089 commit ab29e9e

File tree

9 files changed

+13
-12
lines changed

9 files changed

+13
-12
lines changed

src/coreclr/.nuget/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<!-- Central place to set the versions of all nuget packages produced in the repo -->
66
<PackageVersion Condition="'$(PackageVersion)' == ''">$(ProductVersion)</PackageVersion>
7-
<StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
7+
<StableVersion Condition="'$(DotNetFinalVersionKind)' != '' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
88
<StableVersion Condition="'$(IsShippingPackage)' != 'true' and '$(MSBuildProjectExtension)' == '.pkgproj'"></StableVersion>
99
</PropertyGroup>
1010

src/installer/tests/Assets/Projects/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<!-- When package versions are stabilized, they do not have version suffixes. Because these are
1818
non-shipping tests assets, the Version property will still include suffixes (unlike for shipping
1919
assets), so we explicitly use the ProductVersion (without suffixes) in the stabilized case. -->
20-
<_UpdatedVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</_UpdatedVersion>
20+
<_UpdatedVersion Condition="'$(DotNetFinalVersionKind)' != ''">$(ProductVersion)</_UpdatedVersion>
2121
</PropertyGroup>
2222
<ItemGroup>
2323
<RuntimeFramework Version="$(_UpdatedVersion)"

src/libraries/System.Private.CoreLib/gen/System.Private.CoreLib.Generators.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<IsRoslynComponent>true</IsRoslynComponent>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<DefineConstants Condition="'$(StabilizePackageVersion)' == 'true'">$(DefineConstants);STABILIZE_PACKAGE_VERSION</DefineConstants>
8+
<DefineConstants Condition="'$(DotNetFinalVersionKind)' != ''">$(DefineConstants);STABILIZE_PACKAGE_VERSION</DefineConstants>
99
</PropertyGroup>
1010

1111
<ItemGroup>

src/libraries/System.Runtime/tests/System.Runtime.InteropServices.RuntimeInformation.Tests/DescriptionNameTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ public void VerifyFrameworkDescriptionContainsCorrectVersion()
198198
Assert.DoesNotContain("+", version); // no git hash
199199

200200
#if STABILIZE_PACKAGE_VERSION
201-
// a stabilized version looks like 8.0.0
202-
Assert.DoesNotContain("-", version);
201+
// a stabilized version looks like 8.0.0 or 8.0.0-preview.5.final
202+
Assert.True((version.IndexOf("-", StringComparison.OrdinalIgnoreCase) == -1) ||
203+
(version.IndexOf("final", StringComparison.OrdinalIgnoreCase) != -1), version);
203204
Assert.True(Version.TryParse(version, out Version _));
204205
#else
205206
// a non-stabilized version looks like 8.0.0-preview.5.23280.8 or 8.0.0-dev

src/libraries/System.Runtime/tests/System.Runtime.InteropServices.RuntimeInformation.Tests/System.Runtime.InteropServices.RuntimeInformation.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent)-browser</TargetFrameworks>
66
</PropertyGroup>
77
<PropertyGroup>
8-
<DefineConstants Condition="'$(StabilizePackageVersion)' == 'true'">$(DefineConstants);STABILIZE_PACKAGE_VERSION</DefineConstants>
8+
<DefineConstants Condition="'$(DotNetFinalVersionKind)' != ''">$(DefineConstants);STABILIZE_PACKAGE_VERSION</DefineConstants>
99
</PropertyGroup>
1010
<ItemGroup>
1111
<Compile Include="AssemblyInfo.cs" />

src/mono/nuget/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<!-- Central place to set the versions of all mono pkgprojs. -->
66
<PackageVersion Condition="'$(PackageVersion)' == ''">$(ProductVersion)</PackageVersion>
7-
<StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
7+
<StableVersion Condition="'$(DotNetFinalVersionKind)' != '' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
88
<StableVersion Condition="'$(IsShippingPackage)' != 'true' and '$(MSBuildProjectExtension)' == '.pkgproj'" />
99
</PropertyGroup>
1010

src/mono/nuget/Microsoft.NET.Runtime.WorkloadTesting.Internal/Sdk/WorkloadTesting.Core.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
<PropertyGroup>
137137
<!-- Used for workload testing -->
138138
<PackageVersionForWorkloadManifests>$(PackageVersion)</PackageVersionForWorkloadManifests>
139-
<PackageVersionForWorkloadManifests Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</PackageVersionForWorkloadManifests>
139+
<PackageVersionForWorkloadManifests Condition="'$(DotNetFinalVersionKind)' != ''">$(ProductVersion)</PackageVersionForWorkloadManifests>
140140
</PropertyGroup>
141141

142142
<Error Condition="'$(PackageVersionForWorkloadManifests)' == ''"

src/mono/wasi/Wasi.Build.Tests/Wasi.Build.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@
9797

9898
<PropertyGroup>
9999
<!-- Wasm.Build.Tests are not a shipping project, PackageVersion will have a version suffix even for release branch, where actual runtime pack version doesn't have version suffix. Copy & paste to Wasm.Build.Tests -->
100-
<_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</_RuntimePackCurrentVersion>
101-
<_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' != 'true'">$(PackageVersion)</_RuntimePackCurrentVersion>
100+
<_RuntimePackCurrentVersion Condition="'$(DotNetFinalVersionKind)' != ''">$(ProductVersion)</_RuntimePackCurrentVersion>
101+
<_RuntimePackCurrentVersion Condition="'$(DotNetFinalVersionKind)' == ''">$(PackageVersion)</_RuntimePackCurrentVersion>
102102
</PropertyGroup>
103103
<ItemGroup>
104104
<_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER10" />

src/mono/wasm/Wasm.Build.Tests/Wasm.Build.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@
135135

136136
<PropertyGroup>
137137
<!-- Wasm.Build.Tests are not a shipping project, PackageVersion will have a version suffix even for release branch, where actual runtime pack version doesn't have version suffix. Copy & paste to Wasi.Build.Tests -->
138-
<_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</_RuntimePackCurrentVersion>
139-
<_RuntimePackCurrentVersion Condition="'$(StabilizePackageVersion)' != 'true'">$(PackageVersion)</_RuntimePackCurrentVersion>
138+
<_RuntimePackCurrentVersion Condition="'$(DotNetFinalVersionKind)' != ''">$(ProductVersion)</_RuntimePackCurrentVersion>
139+
<_RuntimePackCurrentVersion Condition="'$(DotNetFinalVersionKind)' == ''">$(PackageVersion)</_RuntimePackCurrentVersion>
140140
</PropertyGroup>
141141
<ItemGroup>
142142
<_RuntimePackVersions Include="$(_RuntimePackCurrentVersion)" EnvVarName="RUNTIME_PACK_VER10" />

0 commit comments

Comments
 (0)