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
|
# Build artifacts
|
||||||
artifacts/
|
artifacts/
|
||||||
|
artifacts-*/
|
||||||
bin/
|
bin/
|
||||||
.dotnet/
|
.dotnet/
|
||||||
|
.dotnet-*/
|
||||||
|
|
||||||
*_i.c
|
*_i.c
|
||||||
*_p.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"))) {
|
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
|
$dotnetRoot = $env:DOTNET_INSTALL_DIR
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$dotnetRoot = Join-Path $RepoRoot ".dotnet"
|
$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 (-not (Test-Path(Join-Path $dotnetRoot "sdk\$dotnetSdkVersion"))) {
|
||||||
if ($install) {
|
if ($install) {
|
||||||
|
@ -561,6 +566,10 @@ function GetMSBuildBinaryLogCommandLineArgument($arguments) {
|
||||||
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..\..")
|
||||||
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
$EngRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
|
||||||
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
|
$ArtifactsDir = Join-Path $RepoRoot "artifacts"
|
||||||
|
if ($env:ARCADE_PARTITION -ne $null)
|
||||||
|
{
|
||||||
|
$ArtifactsDir = Join-Path $RepoRoot "artifacts-$env:ARCADE_PARTITION"
|
||||||
|
}
|
||||||
$ToolsetDir = Join-Path $ArtifactsDir "toolset"
|
$ToolsetDir = Join-Path $ArtifactsDir "toolset"
|
||||||
$ToolsDir = Join-Path $RepoRoot ".tools"
|
$ToolsDir = Join-Path $RepoRoot ".tools"
|
||||||
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
|
$LogDir = Join-Path (Join-Path $ArtifactsDir "log") $configuration
|
||||||
|
|
|
@ -131,7 +131,9 @@ function InitializeDotNetCli {
|
||||||
dotnet_root="$DOTNET_INSTALL_DIR"
|
dotnet_root="$DOTNET_INSTALL_DIR"
|
||||||
else
|
else
|
||||||
dotnet_root="$repo_root/.dotnet"
|
dotnet_root="$repo_root/.dotnet"
|
||||||
|
if [[ -n "${ARCADE_PARTITION:-}" ]]; then
|
||||||
|
dotnet_root="$repo_root/.dotnet-$ARCADE_PARTITION"
|
||||||
|
fi
|
||||||
export DOTNET_INSTALL_DIR="$dotnet_root"
|
export DOTNET_INSTALL_DIR="$dotnet_root"
|
||||||
|
|
||||||
if [[ ! -d "$DOTNET_INSTALL_DIR/sdk/$dotnet_sdk_version" ]]; then
|
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`
|
eng_root=`cd -P "$_script_dir/.." && pwd`
|
||||||
repo_root=`cd -P "$_script_dir/../.." && pwd`
|
repo_root=`cd -P "$_script_dir/../.." && pwd`
|
||||||
artifacts_dir="$repo_root/artifacts"
|
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"
|
toolset_dir="$artifacts_dir/toolset"
|
||||||
tools_dir="$repo_root/.tools"
|
tools_dir="$repo_root/.tools"
|
||||||
log_dir="$artifacts_dir/log/$configuration"
|
log_dir="$artifacts_dir/log/$configuration"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue