Change the package cache dir to repo-root/.packages (#18550)

This commit is contained in:
Viktor Hofer 2024-02-07 17:27:55 +01:00 committed by GitHub
parent 0368ac38f7
commit 2c49b20264
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 6 additions and 8 deletions

View file

@ -1,11 +1,9 @@
/.dotnet
/.packages
/artifacts
/eng/tools/**/bin
/eng/tools/**/obj
/prereqs/packages
/src/linker/src/ILLink.Tasks/ILLink.Tasks.nuspec
/src/nuget-client/NuGet.config
/test/Microsoft.DotNet.SourceBuild.SmokeTests/bin
/test/Microsoft.DotNet.SourceBuild.SmokeTests/obj
/test/Microsoft.DotNet.SourceBuild.SmokeTests/TestResults
*.binlog
*.binlog

View file

@ -148,7 +148,7 @@
<KeysDir>$([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'keys'))</KeysDir>
<PrereqsPackagesDir>$([MSBuild]::NormalizeDirectory('$(PrereqsDir)', 'packages'))</PrereqsPackagesDir>
<!-- When SB mode, the initial arcade is unzipped to a the "ArcadeBootStrap" dir.
<!-- When SB mode, the initial arcade is unzipped to the "ArcadeBootstrapPackage" dir.
When running in VBPOC, the bootstrap package is the arcade restored at the beginning of the build. -->
<ArcadeBootstrapPackageDir Condition="'$(DotNetBuildSourceOnly)' == 'true'">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'ArcadeBootstrapPackage'))</ArcadeBootstrapPackageDir>
<ArcadeBootstrapPackageDir Condition="'$(DotNetBuildSourceOnly)' != 'true'">$(NuGetPackageRoot)</ArcadeBootstrapPackageDir>

View file

@ -57,8 +57,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
# 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.
packagesDir="$scriptroot/prereqs/packages/"
packagesRestoredDir="${packagesDir}restored/"
packagesRestoredDir="$scriptroot/.packages/"
export NUGET_PACKAGES=$packagesRestoredDir/
# Common settings
@ -77,6 +76,7 @@ sourceRepository=''
sourceVersion=''
CUSTOM_PACKAGES_DIR=''
CUSTOM_SDK_DIR=''
packagesDir="$scriptroot/prereqs/packages/"
packagesArchiveDir="${packagesDir}archive/"
packagesPreviouslySourceBuiltDir="${packagesDir}previously-source-built/"

View file

@ -41,7 +41,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="$RepoRoot\prereqs\packages\restored\"
$env:NUGET_PACKAGES="$RepoRoot\.packages\"
if ($help) {
Get-Usage