Support setting "partition" for arcade to avoid conflicts of .dotnet and artifacts folders
This commit is contained in:
parent
9793bdd474
commit
0151ab4d38
3 changed files with 19 additions and 1 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -95,8 +95,10 @@ dlldata.c
|
|||
|
||||
# Build artifacts
|
||||
artifacts/
|
||||
artifacts-*/
|
||||
bin/
|
||||
.dotnet/
|
||||
.dotnet-*/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
|
|
|
@ -128,7 +128,12 @@ function InitializeDotNetCli([bool]$install) {
|
|||
if ((-not $globalJsonHasRuntimes) -and ($env:DOTNET_INSTALL_DIR -ne $null) -and (Test-Path(Join-Path $env:DOTNET_INSTALL_DIR "sdk\$dotnetSdkVersion"))) {
|
||||
$dotnetRoot = $env:DOTNET_INSTALL_DIR
|
||||
} else {
|
||||
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
||||
if ($env:ARCADE_PARTITION -ne $null)
|
||||
{
|
||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet-$env:ARCADE_PARTITION"
|
||||
}
|
||||
|
||||
if (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
|
||||
if ($install) {
|
||||
|
@ -561,6 +566,10 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
|||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
|
||||
if ($env:ARCADE_PARTITION -ne $null)
|
||||
{
|
||||
$ArtifactsDir = Join-Path $RepoRoot "artifacts-$env:ARCADE_PARTITION"
|
||||
}
|
||||
$ToolsetDir = Join-Path $ArtifactsDir "toolset"
|
||||
$ToolsDir = Join-Path $RepoRoot ".tools"
|
||||
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
|
||||
|
|
|
@ -131,7 +131,9 @@ function InitializeDotNetCli {
|
|||
dotnet_root="$DOTNET_INSTALL_DIR"
|
||||
else
|
||||
dotnet_root="$repo_root/.dotnet"
|
||||
|
||||
if [[ -n "${ARCADE_PARTITION:-}" ]]; then
|
||||
dotnet_root="$repo_root/.dotnet-$ARCADE_PARTITION"
|
||||
fi
|
||||
export DOTNET_INSTALL_DIR="$dotnet_root"
|
||||
|
||||
if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
|
||||
|
@ -360,6 +362,11 @@ _script_dir=`dirname "$_ResolvePath"`
|
|||
eng_root=`cd -P "$_script_dir/.." && pwd`
|
||||
repo_root=`cd -P "$_script_dir/../.." && pwd`
|
||||
artifacts_dir="$repo_root/artifacts"
|
||||
if [[ -n "${ARCADE_PARTITION:-}" ]]; then
|
||||
artifacts_dir="$repo_root/artifacts-$ARCADE_PARTITION"
|
||||
export ArtifactsDir="$artifacts_dir/"
|
||||
fi
|
||||
|
||||
toolset_dir="$artifacts_dir/toolset"
|
||||
tools_dir="$repo_root/.tools"
|
||||
log_dir="$artifacts_dir/log/$configuration"
|
||||
|
|
Loading…
Reference in a new issue