Skip runtime install flag

This commit is contained in:
Victor Hurdugaci 2016-01-29 15:17:14 -08:00
parent 9bb7768717
commit 5c8e9c9091
2 changed files with 33 additions and 19 deletions

View File

@ -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%
@ -43,6 +49,8 @@ IF "%SKIP_DNX_INSTALL%"=="" (
) )
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

View File

@ -46,6 +46,10 @@ 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
if [ ! -z "$KOREBUILD_SKIP_RUNTIME_INSTALL" ]; then
echo "Skipping runtime installation because KOREBUILD_SKIP_RUNTIME_INSTALL is set"
else
# Need to set this variable because by default the install script # Need to set this variable because by default the install script
# requires sudo # requires sudo
export DOTNET_INSTALL_DIR=~/.dotnet export DOTNET_INSTALL_DIR=~/.dotnet
@ -65,6 +69,8 @@ fi
dnvm use default -runtime mono dnvm use default -runtime mono
fi fi
# ============ # ============
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