From 38cc6c391f00835c6a4c83610637a7a62bc5fe75 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Thu, 11 Jan 2024 23:13:20 +0100 Subject: [PATCH] Update Directory.Build.props ... and make the Windows build use the same package cache as build.sh --- src/SourceBuild/content/.gitignore | 1 - src/SourceBuild/content/Directory.Build.props | 20 +++++++++++-------- src/SourceBuild/content/eng/build.ps1 | 2 +- .../repo-projects/Directory.Build.targets | 10 +++++----- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/SourceBuild/content/.gitignore b/src/SourceBuild/content/.gitignore index be9fd234e..2bcbb63f3 100644 --- a/src/SourceBuild/content/.gitignore +++ b/src/SourceBuild/content/.gitignore @@ -1,5 +1,4 @@ /.dotnet -/.packages /artifacts /eng/tools/**/bin /eng/tools/**/obj diff --git a/src/SourceBuild/content/Directory.Build.props b/src/SourceBuild/content/Directory.Build.props index 27fcb621c..36f08b3e9 100644 --- a/src/SourceBuild/content/Directory.Build.props +++ b/src/SourceBuild/content/Directory.Build.props @@ -21,6 +21,8 @@ $([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant) $(BuildArchitecture) + + arm armv6 armel @@ -28,9 +30,10 @@ loongarch64 s390x ppc64le - x64 + $(OverrideTargetRid.Substring($(OverrideTargetRid.LastIndexOf('-'))).TrimStart('-')) x64 + $(TargetArchitecture) AnyCPU @@ -59,6 +62,9 @@ Keep in sync with props/targets in the Arcade.Sdk. --> + $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)')) + $([MSBuild]::NormalizeDirectory('$(NUGET_PACKAGES)')) + $([MSBuild]::NormalizeDirectory('$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'global.json'))')) @@ -136,18 +142,16 @@ $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'src')) $([MSBuild]::NormalizeDirectory('$(RepositoryEngineeringDir)', 'tools')) $([MSBuild]::NormalizeDirectory('$(ToolsDir)', 'tasks')) - $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'prereqs')) - $([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'keys')) $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'repo-projects')) - $(PrereqsDir)/packages/ - $(NuGetPackageRoot) - $(PrereqsPackagesDir)restored/ + $([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'prereqs')) + $([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'keys')) + $([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'packages')) - $(PackagesDir)ArcadeBootstrapPackage/ - $(PackagesDir) + $([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'ArcadeBootstrapPackage')) + $(NuGetPackageRoot) $([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', '$(TargetArchitecture)', '$(Configuration)')) diff --git a/src/SourceBuild/content/eng/build.ps1 b/src/SourceBuild/content/eng/build.ps1 index 4170f7bf3..fa37a21e0 100644 --- a/src/SourceBuild/content/eng/build.ps1 +++ b/src/SourceBuild/content/eng/build.ps1 @@ -32,7 +32,7 @@ function Get-Usage() { # Set the NUGET_PACKAGES dir so that we don't accidentally pull some packages from the global location, # They should be pulled from the local feeds. -$env:NUGET_PACKAGES="$PSScriptRoot/.packages" +$env:NUGET_PACKAGES="$PSScriptRoot\prereqs\packages\restored\" function Build { InitializeToolset diff --git a/src/SourceBuild/content/repo-projects/Directory.Build.targets b/src/SourceBuild/content/repo-projects/Directory.Build.targets index 4f5e01529..12a2d6374 100644 --- a/src/SourceBuild/content/repo-projects/Directory.Build.targets +++ b/src/SourceBuild/content/repo-projects/Directory.Build.targets @@ -360,7 +360,7 @@ @@ -394,8 +394,8 @@ and then delete all expanded files and the nupkg from the package cache so the next time the package is used, it will reload the source-built version --> - <_FilesToCopy Include="$(PackagesDir)$([System.String]::copy('%(_BuiltPackageInfos.PackageId)').ToLowerInvariant())/%(_BuiltPackageInfos.PackageVersion)/**/*.nupkg" /> - <_FilesToDelete Include="$(PackagesDir)$([System.String]::copy('%(_BuiltPackageInfos.PackageId)').ToLowerInvariant())/%(_BuiltPackageInfos.PackageVersion)/**/*.*" /> + <_FilesToCopy Include="$(NuGetPackageRoot)$([System.String]::copy('%(_BuiltPackageInfos.PackageId)').ToLowerInvariant())/%(_BuiltPackageInfos.PackageVersion)/**/*.nupkg" /> + <_FilesToDelete Include="$(NuGetPackageRoot)$([System.String]::copy('%(_BuiltPackageInfos.PackageId)').ToLowerInvariant())/%(_BuiltPackageInfos.PackageVersion)/**/*.*" /> @@ -548,7 +548,7 @@ - + @@ -558,7 +558,7 @@ - +