From aebb42335c44c82e8700735542f4bca048f33a79 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 5 Jul 2016 16:28:00 -0700 Subject: [PATCH] Changed dotnet stage0 to no longer pivot on OS. We just place it under dotnet_stage0/ --- build.proj | 4 +--- .../shared-build-targets-utils/Utils/DotNetCli.cs | 14 +++----------- run_build.ps1 | 2 +- run_build.sh | 7 ++++--- 4 files changed, 9 insertions(+), 18 deletions(-) mode change 100644 => 100755 run_build.sh diff --git a/build.proj b/build.proj index 3308804e3..3e673d4f4 100644 --- a/build.proj +++ b/build.proj @@ -31,9 +31,7 @@ 1.0.2 1.0.2 - $(RepoRoot)/.dotnet_stage0/Windows/$(Architecture) - $(RepoRoot)/.dotnet_stage0/Darwin - $(RepoRoot)/.dotnet_stage0/Linux + $(RepoRoot)/.dotnet_stage0/$(Architecture) .exe $(Stage0Path)/dotnet$(ExeExtension) diff --git a/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs b/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs index 82762ce56..7e6451e98 100644 --- a/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs +++ b/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs @@ -55,17 +55,9 @@ namespace Microsoft.DotNet.Cli.Build private static string GetStage0Path() { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - return Path.Combine(Directory.GetCurrentDirectory(), ".dotnet_stage0", - RuntimeEnvironment.OperatingSystemPlatform.ToString(), - RuntimeEnvironment.RuntimeArchitecture); - } - else - { - return Path.Combine(Directory.GetCurrentDirectory(), ".dotnet_stage0", RuntimeEnvironment.OperatingSystemPlatform.ToString()); - } - + return Path.Combine(Directory.GetCurrentDirectory(), + ".dotnet_stage0", + RuntimeEnvironment.RuntimeArchitecture); } } } diff --git a/run_build.ps1 b/run_build.ps1 index 1a6ba2a33..d11d2517b 100644 --- a/run_build.ps1 +++ b/run_build.ps1 @@ -45,7 +45,7 @@ cat "$RepoRoot\branchinfo.txt" | ForEach-Object { # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot if (!$env:DOTNET_INSTALL_DIR) { - $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture" + $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture" } if (!(Test-Path $env:DOTNET_INSTALL_DIR)) diff --git a/run_build.sh b/run_build.sh old mode 100644 new mode 100755 index 5f8c1e984..bf806048b --- a/run_build.sh +++ b/run_build.sh @@ -15,7 +15,8 @@ done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" OLDPATH="$PATH" -REPOROOT="$DIR/../.." +ARCHITECTURE="x64" +REPOROOT="$DIR" source "$REPOROOT/scripts/common/_prettyprint.sh" while [[ $# > 0 ]]; do @@ -79,7 +80,7 @@ while read line; do done < "$REPOROOT/branchinfo.txt" # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot -[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname) +[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE [ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR $REPOROOT/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose @@ -98,4 +99,4 @@ fi # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -dotnet build3 build.proj /p:Architecture=x64 \ No newline at end of file +dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file