Add runtime and aspnetcore patches to always build libs, app.ref and targetting packs (#13009)

* Add runtime patch to build all packages during source-build

* Add aspnetcore patch to always build App.Ref and targeting packs
This commit is contained in:
Michael Simons 2022-01-19 07:47:28 -06:00 committed by GitHub
parent 9092e6a3c4
commit a22825a1ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,32 @@
From c5211f8557f2fb019416cf1f6c01142965270479 Mon Sep 17 00:00:00 2001
From: Doug Bunting <6431421+dougbu@users.noreply.github.com>
Date: Sun, 16 Jan 2022 22:55:10 -0800
Subject: [PATCH] Always build App.Ref and the targeting packs - set
`$(IsTargetingPackBuilding)` to `true` unconditionally - leave all _use_ of
`$(IsTargetingPackBuilding)`
See https://github.com/dotnet/aspnetcore/issues/39471 for details and backporting.
---
Directory.Build.props | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Directory.Build.props b/Directory.Build.props
index e100d883e9..d71b308905 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -138,11 +138,7 @@
<TargetingPackName>Microsoft.AspNetCore.App.Ref</TargetingPackName>
<RuntimeInstallerBaseName>aspnetcore-runtime</RuntimeInstallerBaseName>
<TargetingPackInstallerBaseName>aspnetcore-targeting-pack</TargetingPackInstallerBaseName>
-
- <!-- This is used to produce targeting pack installers/packages once per major.minor. -->
- <IsTargetingPackBuilding
- Condition=" '$(IsTargetingPackBuilding)' == '' AND '$(AspNetCorePatchVersion)' != '0' ">false</IsTargetingPackBuilding>
- <IsTargetingPackBuilding Condition=" '$(IsTargetingPackBuilding)' == '' ">true</IsTargetingPackBuilding>
+ <IsTargetingPackBuilding>true</IsTargetingPackBuilding>
<!--
Archives and installers using this prefix are intended for internal use only.
--
2.28.0.windows.1

View file

@ -0,0 +1,34 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Santiago Fernandez Madero <safern@microsoft.com>
Date: Tue, 11 Jan 2022 13:55:22 -0800
Subject: [PATCH] [release/6.0] Build all packages when in source-build
Originating PR: https://github.com/dotnet/runtime/pull/63653
---
eng/packaging.targets | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/eng/packaging.targets b/eng/packaging.targets
index 6bcf86dc9f2..ee8e95167d9 100644
--- a/eng/packaging.targets
+++ b/eng/packaging.targets
@@ -34,6 +34,10 @@
'$(IsRIDSpecificProject)' != 'true' and
'$(PreReleaseVersionLabel)' == 'servicing' and
'$(GitHubRepositoryName)' != 'runtimelab'">false</GeneratePackageOnBuild>
+ <!-- When in source-build we need to generate all packages when building for all configurations even in servicing. -->
+ <GeneratePackageOnBuild Condition="!$(GeneratePackageOnBuild) and
+ '$(BuildAllConfigurations)' == 'true' and
+ '$(DotNetBuildFromSource)' == 'true'">true</GeneratePackageOnBuild>
<!-- Search for the documentation file in the intellisense package and otherwise pick up the generated one. -->
<LibIntellisenseDocumentationFilePath>$(XmlDocFileRoot)1033\$(AssemblyName).xml</LibIntellisenseDocumentationFilePath>
<UseIntellisenseDocumentationFile Condition="'$(UseIntellisenseDocumentationFile)' == '' and Exists('$(LibIntellisenseDocumentationFilePath)')">true</UseIntellisenseDocumentationFile>
@@ -279,7 +283,7 @@
</Target>
<Target Name="ValidateServicingVersionIsPropertlySet"
- Condition="'$(PreReleaseVersionLabel)' == 'servicing'"
+ Condition="'$(PreReleaseVersionLabel)' == 'servicing' and '$(DotNetBuildFromSource)' != '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>