forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move dotnet.cmd/sh helper scripts into the repo root (dotnet#672)
* Move dotnet helper scripts to repo root * Don't swallow InitializeDotNetCli output * Use temporary file to store sdk location To avoid a nested process chain in which the inner process then invokes the host, we instead create a temporary file to store the sdk location.
- Loading branch information
1 parent
071da4c
commit f5957b1
Showing
16 changed files
with
89 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@echo off | ||
|
||
powershell -ExecutionPolicy ByPass -NoProfile -Command "& { . '%~dp0eng\common\tools.ps1'; InitializeDotNetCli $true $true }" | ||
|
||
if NOT [%ERRORLEVEL%] == [0] ( | ||
echo Failed to install or invoke dotnet... 1>&2 | ||
exit /b %ERRORLEVEL% | ||
) | ||
|
||
set /p dotnetPath=<%~dp0artifacts\toolset\sdk.txt | ||
|
||
:: Clear the 'Platform' env variable for this session, as it's a per-project setting within the build, and | ||
:: misleading value (such as 'MCD' in HP PCs) may lead to build breakage (issue: #69). | ||
set Platform= | ||
|
||
:: Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism | ||
set DOTNET_MULTILEVEL_LOOKUP=0 | ||
|
||
:: Disable first run since we want to control all package sources | ||
set DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
|
||
call "%dotnetPath%\dotnet.exe" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
source="${BASH_SOURCE[0]}" | ||
# resolve $SOURCE until the file is no longer a symlink | ||
while [[ -h $source ]]; do | ||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
source="$(readlink "$source")" | ||
|
||
# if $source was a relative symlink, we need to resolve it relative to the path where the | ||
# symlink file was located | ||
[[ $source != /* ]] && source="$scriptroot/$source" | ||
done | ||
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )" | ||
|
||
# Don't resolve runtime, shared framework, or SDK from other locations to ensure build determinism | ||
export DOTNET_MULTILEVEL_LOOKUP=0 | ||
|
||
# Disable first run since we want to control all package sources | ||
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 | ||
|
||
source $scriptroot/eng/common/tools.sh | ||
|
||
InitializeDotNetCli true # Install | ||
__dotnetDir=${_InitializeDotNetCli} | ||
|
||
dotnetPath=${__dotnetDir}/dotnet | ||
${dotnetPath} "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters