From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Nikola Milosavljevic Date: Tue, 16 Jan 2024 21:26:06 +0000 Subject: [PATCH] Disable inner-clone in product source-build --- .../tools/SourceBuild/AfterSourceBuild.proj | 34 ++++++++- .../SourceBuild/SourceBuildArcade.targets | 71 ++++++++++++++++++- .../SourceBuildArcadeBuild.targets | 5 +- .../SourceBuild/SourceBuildIntermediate.proj | 56 ++------------- 4 files changed, 111 insertions(+), 55 deletions(-) diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/AfterSourceBuild.proj b/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/AfterSourceBuild.proj index 31f544e6..0b56b22f 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/AfterSourceBuild.proj +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/AfterSourceBuild.proj @@ -15,7 +15,8 @@ Condition="'$(ArcadeInnerBuildFromSource)' != 'true'" DependsOnTargets=" ReportPrebuiltUsage; - PackSourceBuildIntermediateNupkgs" /> + PackSourceBuildIntermediateNupkgs; + CreateRepoManifest" /> @@ -26,7 +27,7 @@ - + @@ -117,11 +118,40 @@ DestinationFiles="$(SourceBuildIntermediateNupkgLicenseFile)" /> + + + + $(ArtifactsDir)RepoManifest.xml + + + + + + + + + + + + + true + + + true + $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'sb')) $([MSBuild]::NormalizeDirectory('$(SourceBuildOutputDir)', 'src')) + $(RepoRoot) $([MSBuild]::NormalizeDirectory('$(SourceBuildOutputDir)', 'package-cache')) $([MSBuild]::NormalizeDirectory('$(SourceBuildOutputDir)', 'prebuilt-report')) @@ -28,6 +38,8 @@ Keep artifacts/ inside source dir so that ancestor-based file lookups find the inner repo, not the outer repo. The inner repo global.json and NuGet.config files may have been modified by source-build, and we want projects inside the artifacts/ dir to respect that. + + Inner-clone removal - in VMR use regular artifacts dir. --> $([MSBuild]::NormalizeDirectory('$(CurrentRepoSourceBuildSourceDir)', 'artifacts')) $([MSBuild]::NormalizeDirectory('$(CurrentRepoSourceBuildArtifactsDir)', 'packages', '$(Configuration)')) @@ -106,8 +118,8 @@ - - + + @@ -118,6 +130,61 @@ + + + + NonShipping.Packages. + $(CurrentRepoSourceBuildArtifactsPackagesDir)$(NonShippingPackagesListPrefix)$(GitHubRepositoryName).lst + + + + + + + + + $(CurrentRepoSourceBuildArtifactsDir) + + $(RepoRoot) + $(CurrentRepoSourceBuildArtifactsPackagesDir) + $([MSBuild]::EnsureTrailingSlash('$(PackageOutputPath)')) + $([MSBuild]::NormalizePath('$(SymbolsArchiveLocation)', 'symbols.lst')) + Symbols. + + .$(Version).$(TargetRid) + $(SymbolsArchiveLocation)$(SymbolsArchivePrefix)$(GitHubRepositoryName)$(SymbolsArchiveSuffix)$(ArchiveExtension) + + + + + + $([MSBuild]::MakeRelative($(SymbolsRoot), %(FullPath))) + + + + + + + + + + + + + diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeBuild.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeBuild.targets index 177a5267..18ab693c 100644 --- a/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeBuild.targets +++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/SourceBuild/SourceBuildArcadeBuild.targets @@ -11,6 +11,7 @@ $([MSBuild]::NormalizePath('$(CurrentRepoSourceBuildArtifactsDir)', 'sourcebuild.binlog')) $(CurrentRepoSourceBuildSourceDir) + $(RepoRoot) true @@ -112,7 +113,7 @@ DependsOnTargets="CopyInnerSourceBuildRepoRoot;CloneInnerSourceBuildRepoRoot"> - + @@ -132,7 +133,7 @@ access to the git data, this also makes it easy to see what changes the source-build infra has made, for diagnosis or exploratory purposes. --> - + - - $(CurrentRepoSourceBuildArtifactsDir) - - $(RepoRoot) - $(CurrentRepoSourceBuildArtifactsPackagesDir) - $(PackageOutputPath) - $(SymbolsArchiveLocation)\symbols.lst - Symbols. - .$(Version).$(TargetRid) - $(SymbolsArchiveLocation)$(SymbolsArchivePrefix)$(GitHubRepositoryName)$(SymbolsArchiveSuffix)$(ArchiveExtension) - - - - - - $([MSBuild]::MakeRelative($(SymbolsRoot), %(FullPath))) - - - - + Condition="'$(SupplementalIntermediateNupkgCategory)' == '$(SymbolsIntermediateNupkgCategory)' and '$(SymbolsArchiveFile)' != ''"> - - - - - + + - - - - - NonShipping.Packages. - $(CurrentRepoSourceBuildArtifactsPackagesDir)$(NonShippingPackagesListPrefix)$(GitHubRepositoryName).lst - - - - + Condition="'$(NonShippingPackagesList)' != ''" + DependsOnTargets="GetCategorizedIntermediateNupkgContents">