Compute SdkAnalysisLevel and inject it into Bundled Version props (#18687)

This commit is contained in:
Chet Husk 2024-02-15 11:36:13 -06:00 committed by GitHub
commit 188a02d09d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 1 deletions

View file

@ -9,6 +9,10 @@
<VersionMinor>0</VersionMinor>
<VersionSDKMinor>1</VersionSDKMinor>
<VersionFeature>00</VersionFeature>
<!-- This property powers the SdkAnalysisLevel property in end-user MSBuild code.
It should always be the hundreds-value of the current SDK version, never any
preview version components or anything else. E.g. 8.0.100, 9.0.300, etc. -->
<SdkFeatureBand>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)00</SdkFeatureBand>
<VersionPrefix>$(VersionMajor).$(VersionMinor).$(VersionSDKMinor)$(VersionFeature)</VersionPrefix>
<MajorMinorVersion>$(VersionMajor).$(VersionMinor)</MajorMinorVersion>
<CliProductBandVersion>$(MajorMinorVersion).$(VersionSDKMinor)</CliProductBandVersion>

View file

@ -514,6 +514,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<BundledNETCorePlatformsPackageVersion>$(_NETCorePlatformsPackageVersion)</BundledNETCorePlatformsPackageVersion>
<BundledRuntimeIdentifierGraphFile>%24(MSBuildThisFileDirectory)RuntimeIdentifierGraph.json</BundledRuntimeIdentifierGraphFile>
<NETCoreSdkVersion>$(Version)</NETCoreSdkVersion>
<SdkAnalysisLevel>$(SdkFeatureBand)</SdkAnalysisLevel>
<NETCoreSdkRuntimeIdentifier>$(ProductMonikerRid)</NETCoreSdkRuntimeIdentifier>
<NETCoreSdkPortableRuntimeIdentifier>$(PortableProductMonikerRid)</NETCoreSdkPortableRuntimeIdentifier>
<_NETCoreSdkIsPreview>$(_NETCoreSdkBeingBuiltIsPreview)</_NETCoreSdkIsPreview>

View file

@ -475,7 +475,7 @@
<Target Name="GenerateVersionFile"
DependsOnTargets="SetupBundledComponents;GetCommitHash;GenerateFullNuGetVersion">
<WriteLinesToFile File="$(SdkOutputDirectory).version"
Lines="$(GitCommitHash);$(Version);$(Rid);$(FullNugetVersion)"
Lines="$(GitCommitHash);$(Version);$(Rid);$(FullNugetVersion);$(SdkFeatureBand)"
Overwrite="true" />
<!-- This is a hack to make the full nuget version available during the publishing step -->