Last active
April 2, 2017 21:22
-
-
Save MiloszKrajewski/2ae6fbd7b1f694794139c7a23690da46 to your computer and use it in GitHub Desktop.
F#ake batch file / bootstrapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#r ".fake/FakeLib.dll" | |
open Fake | |
let build = MSBuild "" "Build" [ ("Configuration", "Release"); ("Platform", "Any CPU") ] >> ignore | |
Target "Clear" (fun _ -> | |
!! "**/bin/" ++ "**/obj/" |> DeleteDirs | |
) | |
Target "Purge" (fun _ -> | |
DeleteDir "packages" | |
) | |
Target "Build" (fun _ -> | |
!! "*.sln" |> build | |
) | |
Target "Restore" (fun _ -> RestorePackages ()) | |
"Clear" ==> "Purge" | |
RunTargetOrDefault "Build" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal | |
set fake=%~dp0\.fake\fake.exe | |
if not exist %fake% ( | |
pushd %~dp0 | |
rmdir /q /s %temp%\nuget\fake 2> nul | |
nuget install -out %temp%\nuget -excludeversion fake | |
xcopy %temp%\nuget\fake\tools\* .\.fake\ | |
popd | |
) | |
%fake% %* | |
endlocal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment