mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-08 03:27:04 +09:00
[release/9.0-staging] Switch to non-incremental servicing (#109316)
* Change pre-release version label to servicing. Bump patch version to 1. * Switch to non-incremental servicing. - Remove incremental servicing docs. - Update APICompat baseline. - Remove some mentions of package servicing process. - Remove redundant source build setting of GeneratePackageOnBuild. * Change the S.D.DS. ProjectReference to `src` instead of `ref` in M.E.L.C. * Update the template message * Update backport.yml message * Update library-servicing.md --------- Co-authored-by: Eric StJohn <ericstj@microsoft.com>
This commit is contained in:
parent
29eae42e95
commit
824bdd214e
11 changed files with 18 additions and 2214 deletions
|
@ -22,6 +22,7 @@ main PR <!-- Link to PR if any that fixed this in the main branch. -->
|
|||
|
||||
<!-- Please assess the risk of taking this fix. Provide details backing up your assessment. -->
|
||||
|
||||
# Package authoring signed off?
|
||||
# Package authoring no longer needed in .NET 9
|
||||
|
||||
IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary [package authoring](../../docs/project/library-servicing.md) and gotten it explicitly reviewed.
|
||||
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
|
||||
Keep in mind that we still need package authoring in .NET 8 and older versions.
|
5
.github/workflows/backport.yml
vendored
5
.github/workflows/backport.yml
vendored
|
@ -48,4 +48,7 @@ jobs:
|
|||
|
||||
- The PR target branch is `release/X.0-staging`, not `release/X.0`.
|
||||
|
||||
- If the change touches code that ships in a NuGet package, you have added the necessary [package authoring](https://github.com/dotnet/runtime/blob/main/docs/project/library-servicing.md) and gotten it explicitly reviewed.
|
||||
## Package authoring no longer needed in .NET 9
|
||||
|
||||
**IMPORTANT**: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
|
||||
Keep in mind that we still need package authoring in .NET 8 and older versions.
|
|
@ -122,8 +122,8 @@
|
|||
<NetFrameworkCurrent Condition="'$(DotNetBuildSourceOnly)' == 'true'" />
|
||||
|
||||
<!-- Important: Set this to the GA version (or a close approximation) during servicing and adjust the TFM property below. -->
|
||||
<ApiCompatNetCoreAppBaselineVersion>8.0.0</ApiCompatNetCoreAppBaselineVersion>
|
||||
<ApiCompatNetCoreAppBaselineTFM>net8.0</ApiCompatNetCoreAppBaselineTFM>
|
||||
<ApiCompatNetCoreAppBaselineVersion>9.0.0-rtm.24516.5</ApiCompatNetCoreAppBaselineVersion>
|
||||
<ApiCompatNetCoreAppBaselineTFM>net9.0</ApiCompatNetCoreAppBaselineTFM>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Label="CalculateConfiguration">
|
||||
|
|
|
@ -8,17 +8,12 @@ Servicing branches represent shipped versions of .NET, and their name is in the
|
|||
- `release/7.0-staging`
|
||||
- `release/6.0-staging`
|
||||
|
||||
## Check if a package is generated
|
||||
|
||||
If a library is packable (check for the `<IsPackable>true</IsPackable>` property) you'll need to set `<GeneratePackageOnBuild>true</GeneratePackageOnBuild>` in the source project. That is necessary as packages aren't generated by default in servicing releases.
|
||||
|
||||
## Determine ServiceVersion
|
||||
|
||||
When you make a change to a library & ship it during the servicing release, the `ServicingVersion` must be bumped. This property is found in the library's source project. It's also possible that the property is not in that file, in which case you'll need to add it to the library's source project and set it to 1. If the property is already present in your library's source project, just increment the servicing version by 1.
|
||||
IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
|
||||
Keep in mind that we still need package authoring in .NET 8 and older versions.
|
||||
|
||||
## Test your changes
|
||||
|
||||
All that's left is to ensure that your changes have worked as expected. To do so, execute the following steps:
|
||||
Develop and test your change as normal. For packages, you may want to test them outside the repo infrastructure. To do so, execute the following steps:
|
||||
|
||||
1. From a clean copy of your branch, run `build.cmd/sh libs -allconfigurations`
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<!-- The .NET product branding version -->
|
||||
<ProductVersion>9.0.0</ProductVersion>
|
||||
<ProductVersion>9.0.1</ProductVersion>
|
||||
<!-- File version numbers -->
|
||||
<MajorVersion>9</MajorVersion>
|
||||
<MinorVersion>0</MinorVersion>
|
||||
<PatchVersion>0</PatchVersion>
|
||||
<PatchVersion>1</PatchVersion>
|
||||
<SdkBandVersion>9.0.100</SdkBandVersion>
|
||||
<PackageVersionNet8>8.0.11</PackageVersionNet8>
|
||||
<PackageVersionNet7>7.0.20</PackageVersionNet7>
|
||||
<PackageVersionNet6>6.0.36</PackageVersionNet6>
|
||||
<PreReleaseVersionLabel>rtm</PreReleaseVersionLabel>
|
||||
<PreReleaseVersionLabel>servicing</PreReleaseVersionLabel>
|
||||
<PreReleaseVersionIteration>
|
||||
</PreReleaseVersionIteration>
|
||||
<!-- Enable to remove prerelease label. -->
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
<PackageReadmeFilePath Condition="'$(PackageReadmeFilePath)' == '' and '$(EnableDefaultPackageReadmeFile)' == 'true'">PACKAGE.md</PackageReadmeFilePath>
|
||||
<BeforePack>$(BeforePack);ValidatePackageReadmeExists</BeforePack>
|
||||
|
||||
<!-- Non-shipping packages shouldn't incrementally serviced. -->
|
||||
<PackageUseIncrementalServicingVersion Condition="'$(IsShipping)' != 'true'">false</PackageUseIncrementalServicingVersion>
|
||||
<!-- Generate packages for rid specific projects or for allconfigurations during build. -->
|
||||
<!-- A package isn't generated if in servicing or in runtimelab. Intended to be overridden at project level. -->
|
||||
<IsRIDSpecificProject Condition="$(MSBuildProjectName.StartsWith('runtime.')) and
|
||||
|
@ -37,15 +35,7 @@
|
|||
'$(BuildAllConfigurations)' == 'true' or
|
||||
'$(IsRIDSpecificProject)' == 'true'
|
||||
) and
|
||||
(
|
||||
'$(PreReleaseVersionLabel)' != 'servicing' or
|
||||
'$(PackageUseIncrementalServicingVersion)' != 'true'
|
||||
) and
|
||||
'$(GitHubRepositoryName)' != 'runtimelab'">true</GeneratePackageOnBuild>
|
||||
<!-- When in source-build we need to generate all packages when building for all configurations even in servicing. -->
|
||||
<GeneratePackageOnBuild Condition="'$(GeneratePackageOnBuild)' != 'true' and
|
||||
'$(BuildAllConfigurations)' == 'true' and
|
||||
'$(DotNetBuildSourceOnly)' == 'true'">true</GeneratePackageOnBuild>
|
||||
|
||||
<!-- During NoBuild pack invocations, skip project reference build. Necessary for the IncludeProjectReferencesWithPackAttributeInPackage target. -->
|
||||
<BuildProjectReferences Condition="'$(NoBuild)' == 'true'">false</BuildProjectReferences>
|
||||
|
@ -58,18 +48,6 @@
|
|||
<NoWarn>$(NoWarn);CP0003</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing' and
|
||||
'$(PackageUseIncrementalServicingVersion)' == 'true'">
|
||||
<!-- If no servicing version is set we need to default to 0 in order for dependency versions to
|
||||
be calculated properly, if we don't set it to 0, we would get the dependency version using the
|
||||
product Patch Version -->
|
||||
<ServicingVersion Condition="'$(ServicingVersion)' == ''">0</ServicingVersion>
|
||||
|
||||
<!-- Always update the package version in servicing. -->
|
||||
<Version>$(MajorVersion).$(MinorVersion).$(ServicingVersion)</Version>
|
||||
<Version Condition="'$(VersionSuffix)' != ''">$(Version)-$(VersionSuffix)</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Main packages intentionally don't include assets for net6.0 and net7.0 anymore. -->
|
||||
<ItemGroup>
|
||||
<PackageValidationBaselineFrameworkToIgnore Include="net6.0" />
|
||||
|
@ -325,14 +303,6 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidateServicingVersionIsProperlySet"
|
||||
Condition="'$(PreReleaseVersionLabel)' == 'servicing' and
|
||||
'$(PackageUseIncrementalServicingVersion)' == 'true' and
|
||||
'$(DotNetBuildSourceOnly)' != 'true'"
|
||||
AfterTargets="GenerateNuspec">
|
||||
<Error Condition="'$(ServicingVersion)' == '0'" Text="ServicingVersion is set to 0 and it should be an increment of the patch version from the last released package." />
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidatePackageReadmeExists"
|
||||
Condition="'$(PackageReadmeFilePath)' != '' and
|
||||
!Exists('$(PackageReadmeFilePath)')">
|
||||
|
|
|
@ -35,8 +35,6 @@
|
|||
<!-- We can't generate an apphost without restoring the targeting pack. -->
|
||||
<UseAppHost>false</UseAppHost>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<!-- Libraries packages use the incremental servicing infrastructure. -->
|
||||
<PackageUseIncrementalServicingVersion>true</PackageUseIncrementalServicingVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Language configuration -->
|
||||
|
|
|
@ -72,12 +72,11 @@
|
|||
|
||||
<!-- The assembly version gets updated during servicing when the assembly isn't part of a targeting pack. -->
|
||||
<PropertyGroup Condition="'$(PreReleaseVersionLabel)' == 'servicing' and
|
||||
'$(IsPackable)' == 'true' and
|
||||
'$(PackageUseIncrementalServicingVersion)' == 'true'">
|
||||
'$(IsPackable)' == 'true'">
|
||||
<_IsWindowsDesktopApp Condition="$(WindowsDesktopCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsWindowsDesktopApp>
|
||||
<_IsAspNetCoreApp Condition="$(AspNetCoreAppLibrary.Contains('$(AssemblyName);'))">true</_IsAspNetCoreApp>
|
||||
<_AssemblyInTargetingPack Condition="('$(IsNETCoreAppSrc)' == 'true' or '$(IsNetCoreAppRef)' == 'true' or '$(_IsAspNetCoreApp)' == 'true' or '$(_IsWindowsDesktopApp)' == 'true') and '$(TargetFrameworkIdentifier)' != '.NETFramework'">true</_AssemblyInTargetingPack>
|
||||
<AssemblyVersion Condition="'$(_AssemblyInTargetingPack)' != 'true'">$(MajorVersion).$(MinorVersion).0.$(ServicingVersion)</AssemblyVersion>
|
||||
<AssemblyVersion Condition="'$(_AssemblyInTargetingPack)' != 'true'">$(MajorVersion).$(MinorVersion).0.$(PatchVersion)</AssemblyVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(RepositoryEngineeringDir)versioning.targets" />
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="$(CoreLibSharedDir)System\Runtime\CompilerServices\IsExternalInit.cs" Link="Common\System\Runtime\CompilerServices\IsExternalInit.cs" />
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)Microsoft.Extensions.Logging.Console\src\Microsoft.Extensions.Logging.Console.csproj" SkipUseReferenceAssembly="true" />
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.DiagnosticSource\ref\System.Diagnostics.DiagnosticSource.csproj" />
|
||||
<ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.DiagnosticSource\src\System.Diagnostics.DiagnosticSource.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- https://learn.microsoft.com/dotnet/fundamentals/package-validation/diagnostic-ids -->
|
||||
<Suppressions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<Suppression>
|
||||
<DiagnosticId>PKV006</DiagnosticId>
|
||||
<Target>net8.0</Target>
|
||||
</Suppression>
|
||||
</Suppressions>
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue