Repository navigation
Move dotnet.cmd/sh helper scripts into the repo root #672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
49b38cc
Move dotnet helper scripts to repo root
ViktorHofer d46c212
Delete broken script which invokes dotnet.cmd
ViktorHofer 50271d4
Fix -x permissions and optionally install cli
ViktorHofer d1ae47c
Don't swallow InitializeDotNetCli output
ViktorHofer 0c22823
Merge branch 'DotNetHelperScripts' of https://github.com/ViktorHofer/…
ViktorHofer 38f4709
Invoke dotnet SDK in the calling script
ViktorHofer 768436b
Use temporary file to store sdk location
ViktorHofer d928de1
Guard against multiple invocations
ViktorHofer f06d94b
Guard against invocation error
ViktorHofer 4e3e20a
Add temp file logic to tools.ps1
ViktorHofer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.