From 52c0145c648f0c858b6c3c7b9c9bd26371cdcc0c Mon Sep 17 00:00:00 2001 From: Mike Griese Date: Thu, 4 Jun 2020 07:39:30 -0500 Subject: [PATCH] Add a helper to skip nuget restore during local builds (#6339) Running `nuget restore` on every build is pretty unnecessary - usually, you _know_ when you need to run it. For the inner dev loop, this is a few seconds on every `bx` build. This adds a environment variable you can set to skip the `nuget restore` part of a `bcz` build. Add the following to your `.razzlerc.cmd`: ```cmd set _SKIP_NUGET_RESTORE=1 ``` and `bcz` (and the other helpers) _won't_ perform a nuget restore on every build. --- tools/bcz.cmd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/bcz.cmd b/tools/bcz.cmd index 4398a8b46..f70269aaf 100644 --- a/tools/bcz.cmd +++ b/tools/bcz.cmd @@ -65,8 +65,12 @@ if "%_EXCLUSIVE%" == "1" ( if "%PROJECT_NAME%" == "" ( goto :eof ) else echo Building only %PROJECT_NAME% ) -echo Performing nuget restore... -nuget.exe restore %OPENCON%\OpenConsole.sln +if "%_SKIP_NUGET_RESTORE%" == "1" ( + echo Skipped nuget restore +) else ( + echo Performing nuget restore... + nuget.exe restore %OPENCON%\OpenConsole.sln +) set _BUILD_CMDLINE="%MSBUILD%" %OPENCON%\OpenConsole.sln /t:"%_MSBUILD_TARGET%" /m /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% %_APPX_ARGS%