forked from dotnet/tye
-
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.
- Loading branch information
Showing
111 changed files
with
9,658 additions
and
79 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" /> | ||
|
||
<!-- | ||
TODO come back here for copyright as part of #4 | ||
<PropertyGroup Condition="'$(CopyrightNetFoundation)' != ''"> | ||
<Copyright>$(CopyrightNetFoundation)</Copyright> | ||
</PropertyGroup> | ||
--> | ||
|
||
<PropertyGroup> | ||
<PackageLicenseExpression>MIT</PackageLicenseExpression> | ||
<StrongNameKeyId>Microsoft</StrongNameKeyId> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<!-- Lots of our dependencies are not strong-named --> | ||
<NoWarn>$(NoWarn);8002</NoWarn> | ||
<Nullable>enable</Nullable> | ||
<LangVersion>8.0</LangVersion> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<SignAssembly>true</SignAssembly> | ||
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\build\key.snk</AssemblyOriginatorKeyFile> | ||
<PublicSign>true</PublicSign> | ||
<PublicKey>00240000048000009400000006020000002400005253413100040000010001002988e6f91c38fe1e628fa9e974c30b9fd62dafff7b5df5b7d6663416c636b50de22abc7e9933071d5c0e95822d927009e6502e0eea94bfb40674f555fbad9824b6e24418bc79aad5651f56e878b1f83ef28e89b8e243c9552726e2ca53601def0513f127e8a523db4ac4566fc2d68a86d3e2d28e2b058e3053f789e3c8025a83</PublicKey> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Nerdbank.GitVersioning"> | ||
<Version>3.0.50</Version> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# | ||
# This file must be used by invoking ". .\activate.ps1" from the command line. | ||
# You cannot run it directly. See https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_scripts#script-scope-and-dot-sourcing | ||
# | ||
# To exit from the environment this creates, execute the 'deactivate' function. | ||
# | ||
|
||
if ($MyInvocation.CommandOrigin -eq 'runspace') { | ||
Write-Host -f Red "This script cannot be invoked directly." | ||
Write-Host -f Red "To function correctly, this script file must be 'dot sourced' by calling `". $PSCommandPath`" (notice the dot at the beginning)." | ||
exit 1 | ||
} | ||
|
||
function deactivate ([switch]$init) { | ||
|
||
# reset old environment variables | ||
if (Test-Path variable:_OLD_PATH) { | ||
$env:PATH = $_OLD_PATH | ||
Remove-Item variable:_OLD_PATH | ||
} | ||
|
||
if (test-path function:_old_prompt) { | ||
Set-Item Function:prompt -Value $function:_old_prompt -ea ignore | ||
remove-item function:_old_prompt | ||
} | ||
|
||
Remove-Item env:DOTNET_ROOT -ea ignore | ||
Remove-Item env:DOTNET_MULTILEVEL_LOOKUP -ea ignore | ||
if (-not $init) { | ||
# Remove the deactivate function | ||
Remove-Item function:deactivate | ||
} | ||
} | ||
|
||
# Cleanup the environment | ||
deactivate -init | ||
|
||
$_OLD_PATH = $env:PATH | ||
# Tell dotnet where to find itself | ||
$env:DOTNET_ROOT = "$PSScriptRoot\.dotnet" | ||
${env:DOTNET_ROOT(x86)} = "$PSScriptRoot\.dotnet\x86" | ||
# Tell dotnet not to look beyond the DOTNET_ROOT folder for more dotnet things | ||
$env:DOTNET_MULTILEVEL_LOOKUP = 0 | ||
# Put dotnet first on PATH | ||
$env:PATH = "${env:DOTNET_ROOT};${env:PATH}" | ||
|
||
# Set the shell prompt | ||
if (-not $env:DISABLE_CUSTOM_PROMPT) { | ||
$function:_old_prompt = $function:prompt | ||
function dotnet_prompt { | ||
# Add a prefix to the current prompt, but don't discard it. | ||
write-host "($( split-path $PSScriptRoot -leaf )) " -nonewline | ||
& $function:_old_prompt | ||
} | ||
|
||
Set-Item Function:prompt -Value $function:dotnet_prompt -ea ignore | ||
} | ||
|
||
Write-Host -f Magenta "Enabled the .NET Core environment. Execute 'deactivate' to exit." | ||
if (-not (Test-Path "${env:DOTNET_ROOT}\dotnet.exe")) { | ||
Write-Host -f Yellow ".NET Core has not been installed yet. Run $PSScriptRoot\restore.cmd to install it." | ||
} | ||
else { | ||
Write-Host "dotnet = ${env:DOTNET_ROOT}\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,94 @@ | ||
# | ||
# This file must be used by invoking "source activate.sh" from the command line. | ||
# You cannot run it directly. | ||
# To exit from the environment this creates, execute the 'deactivate' function. | ||
|
||
_RED="\033[0;31m" | ||
_MAGENTA="\033[0;95m" | ||
_YELLOW="\033[0;33m" | ||
_RESET="\033[0m" | ||
|
||
# This detects if a script was sourced or invoked directly | ||
# See https://stackoverflow.com/a/28776166/2526265 | ||
sourced=0 | ||
if [ -n "$ZSH_EVAL_CONTEXT" ]; then | ||
case $ZSH_EVAL_CONTEXT in *:file) sourced=1;; esac | ||
THIS_SCRIPT="${0:-}" | ||
elif [ -n "$KSH_VERSION" ]; then | ||
[ "$(cd $(dirname -- $0) && pwd -P)/$(basename -- $0)" != "$(cd $(dirname -- ${.sh.file}) && pwd -P)/$(basename -- ${.sh.file})" ] && sourced=1 | ||
THIS_SCRIPT="${0:-}" | ||
elif [ -n "$BASH_VERSION" ]; then | ||
(return 2>/dev/null) && sourced=1 | ||
THIS_SCRIPT="$BASH_SOURCE" | ||
else # All other shells: examine $0 for known shell binary filenames | ||
# Detects `sh` and `dash`; add additional shell filenames as needed. | ||
case ${0##*/} in sh|dash) sourced=1;; esac | ||
THIS_SCRIPT="${0:-}" | ||
fi | ||
|
||
if [ $sourced -eq 0 ]; then | ||
printf "${_RED}This script cannot be invoked directly.${_RESET}\n" | ||
printf "${_RED}To function correctly, this script file must be sourced by calling \"source $0\".${_RESET}\n" | ||
exit 1 | ||
fi | ||
|
||
deactivate () { | ||
|
||
# reset old environment variables | ||
if [ ! -z "${_OLD_PATH:-}" ] ; then | ||
export PATH="$_OLD_PATH" | ||
unset _OLD_PATH | ||
fi | ||
|
||
if [ ! -z "${_OLD_PS1:-}" ] ; then | ||
export PS1="$_OLD_PS1" | ||
unset _OLD_PS1 | ||
fi | ||
|
||
# This should detect bash and zsh, which have a hash command that must | ||
# be called to get it to forget past commands. Without forgetting | ||
# past commands the $PATH changes we made may not be respected | ||
if [ -n "${BASH:-}" ] || [ -n "${ZSH_VERSION:-}" ] ; then | ||
hash -r 2>/dev/null | ||
fi | ||
|
||
unset DOTNET_ROOT | ||
unset DOTNET_MULTILEVEL_LOOKUP | ||
if [ ! "${1:-}" = "init" ] ; then | ||
# Remove the deactivate function | ||
unset -f deactivate | ||
fi | ||
} | ||
|
||
# Cleanup the environment | ||
deactivate init | ||
|
||
DIR="$( cd "$( dirname "$THIS_SCRIPT" )" && pwd )" | ||
_OLD_PATH="$PATH" | ||
# Tell dotnet where to find itself | ||
export DOTNET_ROOT="$DIR/.dotnet" | ||
# Tell dotnet not to look beyond the DOTNET_ROOT folder for more dotnet things | ||
export DOTNET_MULTILEVEL_LOOKUP=0 | ||
# Put dotnet first on PATH | ||
export PATH="$DOTNET_ROOT:$PATH" | ||
|
||
# Set the shell prompt | ||
if [ -z "${DISABLE_CUSTOM_PROMPT:-}" ] ; then | ||
_OLD_PS1="$PS1" | ||
export PS1="(`basename \"$DIR\"`) $PS1" | ||
fi | ||
|
||
# This should detect bash and zsh, which have a hash command that must | ||
# be called to get it to forget past commands. Without forgetting | ||
# past commands the $PATH changes we made may not be respected | ||
if [ -n "${BASH:-}" ] || [ -n "${ZSH_VERSION:-}" ] ; then | ||
hash -r 2>/dev/null | ||
fi | ||
|
||
printf "${_MAGENTA}Enabled the .NET Core environment. Execute 'deactivate' to exit.${_RESET}\n" | ||
|
||
if [ ! -f "$DOTNET_ROOT/dotnet" ]; then | ||
printf "${_YELLOW}.NET Core has not been installed yet. Run $DIR/restore.sh to install it.${_RESET}\n" | ||
else | ||
printf "dotnet = $DOTNET_ROOT/dotnet\n" | ||
fi |
Oops, something went wrong.