From 939f363a0e0dac89f3fc4ea1a37af5f545e81b0a Mon Sep 17 00:00:00 2001 From: Pranav K Date: Sun, 2 Feb 2014 08:31:24 -0800 Subject: [PATCH] Updatng build.cmd to use cached NuGet.exe --- build.cmd | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/build.cmd b/build.cmd index c3b2462019..7045ee1f84 100644 --- a/build.cmd +++ b/build.cmd @@ -1,16 +1,23 @@ @echo off cd %~dp0 -IF EXIST .nuget\NuGet.exe goto restore +SETLOCAL +SET CACHED_NUGET=%LocalAppData%\NuGet\NuGet.exe + +IF EXIST %CACHED_NUGET% goto copynuget echo Downloading latest version of NuGet.exe... +IF NOT EXIST %LocalAppData%\NuGet md %LocalAppData%\NuGet +@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '%CACHED_NUGET%'" + +:copynuget +IF EXIST .nuget\nuget.exe goto restore md .nuget -@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'https://www.nuget.org/nuget.exe' -OutFile '.nuget\NuGet.exe'" +copy %CACHED_NUGET% .nuget\nuget.exe > nul :restore -IF EXIST build goto run +IF EXIST packages\KoreBuild goto run .nuget\NuGet.exe install KoreBuild -ExcludeVersion -o packages -nocache -pre -xcopy packages\KoreBuild\build build\ /Y -.nuget\NuGet.exe install Sake -version 0.2 -o packages +.nuget\NuGet.exe install Sake -version 0.2 -o packages -ExcludeVersion :run -packages\Sake.0.2\tools\Sake.exe -I build -f makefile.shade %* +packages\Sake\tools\Sake.exe -I packages\KoreBuild\build -f makefile.shade %*