Skip runtime install flag
This commit is contained in:
parent
9bb7768717
commit
5c8e9c9091
|
|
@ -22,10 +22,16 @@ IF NOT EXIST xunit.core (
|
||||||
"%NUGET_PATH%" install xunit.core -ExcludeVersion -Source https://api.nuget.org/v3/index.json -o %~dp0
|
"%NUGET_PATH%" install xunit.core -ExcludeVersion -Source https://api.nuget.org/v3/index.json -o %~dp0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
IF "%KOREBUILD_SKIP_RUNTIME_INSTALL%"=="1" (
|
||||||
|
ECHO Skipping runtime installation because KOREBUILD_SKIP_RUNTIME_INSTALL = 1
|
||||||
|
GOTO :SKIP_RUNTIME_INSTALL
|
||||||
|
)
|
||||||
|
|
||||||
SET DOTNET_LOCAL_INSTALL_FOLDER=%LOCALAPPDATA%\Microsoft\dotnet\cli
|
SET DOTNET_LOCAL_INSTALL_FOLDER=%LOCALAPPDATA%\Microsoft\dotnet\cli
|
||||||
SET DOTNET_LOCAL_INSTALL_FOLDER_BIN=%DOTNET_LOCAL_INSTALL_FOLDER%\bin
|
SET DOTNET_LOCAL_INSTALL_FOLDER_BIN=%DOTNET_LOCAL_INSTALL_FOLDER%\bin
|
||||||
|
|
||||||
CALL %~dp0dotnet-install.cmd -version "1.0.0.000973"
|
CALL %~dp0dotnet-install.cmd -version "1.0.0.000973"
|
||||||
|
|
||||||
ECHO Adding %DOTNET_LOCAL_INSTALL_FOLDER_BIN% to PATH
|
ECHO Adding %DOTNET_LOCAL_INSTALL_FOLDER_BIN% to PATH
|
||||||
SET PATH=%DOTNET_LOCAL_INSTALL_FOLDER_BIN%;%PATH%
|
SET PATH=%DOTNET_LOCAL_INSTALL_FOLDER_BIN%;%PATH%
|
||||||
ECHO Setting DOTNET_HOME to %DOTNET_LOCAL_INSTALL_FOLDER%
|
ECHO Setting DOTNET_HOME to %DOTNET_LOCAL_INSTALL_FOLDER%
|
||||||
|
|
@ -42,7 +48,9 @@ IF "%SKIP_DNX_INSTALL%"=="" (
|
||||||
CALL %KOREBUILD_FOLDER%\build\dnvm use default -runtime CLR -arch x86
|
CALL %KOREBUILD_FOLDER%\build\dnvm use default -runtime CLR -arch x86
|
||||||
)
|
)
|
||||||
REM ============================
|
REM ============================
|
||||||
|
|
||||||
|
:SKIP_RUNTIME_INSTALL
|
||||||
|
|
||||||
SET MAKEFILE_PATH=makefile.shade
|
SET MAKEFILE_PATH=makefile.shade
|
||||||
IF NOT EXIST %MAKEFILE_PATH% (
|
IF NOT EXIST %MAKEFILE_PATH% (
|
||||||
SET MAKEFILE_PATH=%KOREBUILD_FOLDER%\build\makefile.shade
|
SET MAKEFILE_PATH=%KOREBUILD_FOLDER%\build\makefile.shade
|
||||||
|
|
|
||||||
|
|
@ -46,25 +46,31 @@ fi
|
||||||
if [ ! -d $thisDir/xunit.core ]; then
|
if [ ! -d $thisDir/xunit.core ]; then
|
||||||
mono $nugetPath install xunit.core -ExcludeVersion -o $thisDir -nocache -pre
|
mono $nugetPath install xunit.core -ExcludeVersion -o $thisDir -nocache -pre
|
||||||
fi
|
fi
|
||||||
# Need to set this variable because by default the install script
|
|
||||||
# requires sudo
|
if [ ! -z "$KOREBUILD_SKIP_RUNTIME_INSTALL" ]; then
|
||||||
export DOTNET_INSTALL_DIR=~/.dotnet
|
echo "Skipping runtime installation because KOREBUILD_SKIP_RUNTIME_INSTALL is set"
|
||||||
export PATH=~/.dotnet/bin:$PATH
|
else
|
||||||
export DOTNET_HOME=DOTNET_INSTALL_DIR
|
# Need to set this variable because by default the install script
|
||||||
export KOREBUILD_FOLDER="$(dirname $thisDir)"
|
# requires sudo
|
||||||
chmod +x $thisDir/dotnet-install.sh
|
export DOTNET_INSTALL_DIR=~/.dotnet
|
||||||
$thisDir/dotnet-install.sh
|
export PATH=~/.dotnet/bin:$PATH
|
||||||
# ==== Temporary ====
|
export DOTNET_HOME=DOTNET_INSTALL_DIR
|
||||||
if ! type dnvm > /dev/null 2>&1; then
|
export KOREBUILD_FOLDER="$(dirname $thisDir)"
|
||||||
source $thisDir/dnvm.sh
|
chmod +x $thisDir/dotnet-install.sh
|
||||||
|
$thisDir/dotnet-install.sh
|
||||||
|
# ==== Temporary ====
|
||||||
|
if ! type dnvm > /dev/null 2>&1; then
|
||||||
|
source $thisDir/dnvm.sh
|
||||||
|
fi
|
||||||
|
if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then
|
||||||
|
dnvm install latest -runtime coreclr -alias default
|
||||||
|
dnvm install default -runtime mono -alias default
|
||||||
|
else
|
||||||
|
dnvm use default -runtime mono
|
||||||
|
fi
|
||||||
|
# ============
|
||||||
fi
|
fi
|
||||||
if ! type dnx > /dev/null 2>&1 || [ -z "$SKIP_DNX_INSTALL" ]; then
|
|
||||||
dnvm install latest -runtime coreclr -alias default
|
|
||||||
dnvm install default -runtime mono -alias default
|
|
||||||
else
|
|
||||||
dnvm use default -runtime mono
|
|
||||||
fi
|
|
||||||
# ============
|
|
||||||
# Probe for Mono Reference assemblies
|
# Probe for Mono Reference assemblies
|
||||||
if [ -z "$DOTNET_REFERENCE_ASSEMBLIES_PATH" ]; then
|
if [ -z "$DOTNET_REFERENCE_ASSEMBLIES_PATH" ]; then
|
||||||
if [ $(uname) == Darwin ] && [ -d "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks" ]; then
|
if [ $(uname) == Darwin ] && [ -d "/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue