Updating build.cmd to cache NuGet.exe
This commit is contained in:
parent
e10699474b
commit
6c4d078e41
12
build.cmd
12
build.cmd
|
|
@ -1,10 +1,18 @@
|
||||||
@echo off
|
@echo off
|
||||||
cd %~dp0
|
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...
|
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
|
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
|
:restore
|
||||||
IF EXIST packages\KoreBuild goto run
|
IF EXIST packages\KoreBuild goto run
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue