2015-09-08 08:01:46 +03:00
|
|
|
@echo off
|
|
|
|
cd %~dp0
|
|
|
|
|
|
|
|
SETLOCAL
|
2015-10-02 04:05:34 +03:00
|
|
|
SET NUGET_VERSION=latest
|
|
|
|
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.exe
|
2015-09-08 08:01:46 +03:00
|
|
|
SET BUILDCMD_KOREBUILD_VERSION=""
|
|
|
|
SET BUILDCMD_DNX_VERSION=""
|
|
|
|
|
|
|
|
IF EXIST %CACHED_NUGET% goto copynuget
|
|
|
|
echo Downloading latest version of NuGet.exe...
|
|
|
|
IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet
|
2015-10-02 04:05:34 +03:00
|
|
|
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
|
2015-09-08 08:01:46 +03:00
|
|
|
|
|
|
|
:copynuget
|
|
|
|
IF EXIST .nuget\nuget.exe goto restore
|
|
|
|
md .nuget
|
|
|
|
copy %CACHED_NUGET% .nuget\nuget.exe > nul
|
|
|
|
|
|
|
|
:restore
|
|
|
|
IF EXIST packages\KoreBuild goto run
|
|
|
|
IF %BUILDCMD_KOREBUILD_VERSION%=="" (
|
2015-10-02 04:05:34 +03:00
|
|
|
.nuget\nuget.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre
|
2015-09-08 08:01:46 +03:00
|
|
|
) ELSE (
|
2015-10-02 04:05:34 +03:00
|
|
|
.nuget\nuget.exe install KoreBuild -version %BUILDCMD_KOREBUILD_VERSION% -ExcludeVersion -o packages -nocache -pre
|
2015-09-08 08:01:46 +03:00
|
|
|
)
|
2015-10-02 04:05:34 +03:00
|
|
|
.nuget\nuget.exe install Sake -ExcludeVersion -Out packages
|
2015-09-08 08:01:46 +03:00
|
|
|
|
|
|
|
IF "%SKIP_DNX_INSTALL%"=="1" goto run
|
|
|
|
IF %BUILDCMD_DNX_VERSION%=="" (
|
|
|
|
CALL packages\KoreBuild\build\dnvm upgrade -runtime CLR -arch x86
|
|
|
|
) ELSE (
|
2015-10-02 04:05:34 +03:00
|
|
|
CALL packages\KoreBuild\build\dnvm install %BUILDCMD_DNX_VERSION% -runtime CLR -arch x86 -alias default
|
2015-09-08 08:01:46 +03:00
|
|
|
)
|
|
|
|
CALL packages\KoreBuild\build\dnvm install default -runtime CoreCLR -arch x86
|
|
|
|
|
|
|
|
:run
|
|
|
|
CALL packages\KoreBuild\build\dnvm use default -runtime CLR -arch x86
|
|
|
|
packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*
|