Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0] Stable branding for GA #108899

Merged
merged 5 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PreReleaseVersionIteration>
</PreReleaseVersionIteration>
<!-- Enable to remove prerelease label. -->
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
<StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">true</StabilizePackageVersion>
<DotNetFinalVersionKind Condition="'$(StabilizePackageVersion)' == 'true'">release</DotNetFinalVersionKind>
<WorkloadVersionSuffix Condition="'$(DotNetFinalVersionKind)' != 'release' and '$(PreReleaseVersionIteration)' == '' and '$(PreReleaseVersionLabel)' != 'rtm'">-$(PreReleaseVersionLabel)</WorkloadVersionSuffix>
<WorkloadVersionSuffix Condition="'$(WorkloadVersionSuffix)' == '' and '$(DotNetFinalVersionKind)' != 'release' and '$(PreReleaseVersionLabel)' != 'rtm'">-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</WorkloadVersionSuffix>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,21 @@ public void VerifyFrameworkDescriptionContainsCorrectVersion()
Assert.DoesNotContain("+", version); // no git hash

#if STABILIZE_PACKAGE_VERSION
// a stabilized version looks like 8.0.0
Assert.DoesNotContain("-", version);
Assert.True(Version.TryParse(version, out Version _));
// A stabilized version looks like 9.0.0
// In local builds, the version looks like 9.0.0-dev, and in PRs CI, the version looks like 9.0.0-ci.
// Both are acceptable.
if (!version.Contains("-dev") && !version.Contains("-ci"))
Copy link
Member

@akoeplinger akoeplinger Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct. The FrameworkDescription should always contain the stabilized version irrespective of the build environment.

This is a regression caused by #102164. Before it was reading the AssemblyInformationalVersion from System.Private.CoreLib.dll which is 9.0.0*, now it's reading it from the generators assembly and that contains 9.0.0-dev (basically what Stephen noticed in #102164 (comment))

* this is because we override it here:

<!-- Override InformationalVersion during servicing as it's returned via public api. -->
<InformationalVersion Condition="'$(PreReleaseVersionLabel)' == 'servicing'">$(ProductVersion)</InformationalVersion>
<InformationalVersion Condition="'$(StabilizePackageVersion)' == 'true'">$(ProductVersion)</InformationalVersion>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a fix. There is potential to clean up overriding the version in SPC.dll now I think but that can be done separately.

{
Assert.DoesNotContain("-", version);
}
else
{
version = version.Substring(0, version.IndexOf("-")); // remove -dev or -ci
}
Assert.True(Version.TryParse(version, out Version _), $"Version could not be parsed: {version}");
#else
// a non-stabilized version looks like 8.0.0-preview.5.23280.8 or 8.0.0-dev
// a non-stabilized version looks like 9.0.0-preview.5.12345.1, 9.0.0-rc.1.12345.1 or 9.0.0-rtm.1.12345.1
// -dev always shows up in local buids, and -ci always shows up in the CI of PRs.
Assert.Contains("-", version);
var versionNumber = version.Substring(0, version.IndexOf("-"));
Assert.True(Version.TryParse(versionNumber, out Version _));
Expand Down
Loading