Skip to content

Instantly share code, notes, and snippets.

@petedavis
Created March 11, 2016 03:46
Show Gist options
  • Save petedavis/d791882ad7ecb96d4d3e to your computer and use it in GitHub Desktop.
Save petedavis/d791882ad7ecb96d4d3e to your computer and use it in GitHub Desktop.
Setup Fake.Deploy
@echo on
cd %~dp0
SETLOCAL
SET NUGET_VERSION=latest
SET CACHED_NUGET=%LocalAppData%\NuGet\nuget.%NUGET_VERSION%.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://dist.nuget.org/win-x86-commandline/%NUGET_VERSION%/nuget.exe' -OutFile '%CACHED_NUGET%'"
:copynuget
IF EXIST tools\nuget\nuget.exe goto setupfake
md tools\nuget
copy %CACHED_NUGET% tools\nuget\nuget.exe > nul
:setupfake
If Exist tools\FAKE\tools\fake.exe goto end
tools\nuget\nuget.exe Install FAKE -OutputDirectory "tools" -ExcludeVersion
tools\FAKE\tools\Fake.Deploy.exe /install
:end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment