Skip to content

Instantly share code, notes, and snippets.

@cromica
Created November 14, 2015 10:44
Show Gist options
  • Save cromica/02318ab4b34c76d19cdb to your computer and use it in GitHub Desktop.
Save cromica/02318ab4b34c76d19cdb to your computer and use it in GitHub Desktop.
build windows batch script
@echo off
nuget "install" "xunit.runner.console" "-OutputDirectory" "tools" "-ExcludeVersion"
nuget "install" "FAKE.Core" "-OutputDirectory" "tools" "-ExcludeVersion"
nuget restore
:Build
SET TARGET="Default"
IF NOT [%1]==[] (set TARGET="%1")
SET BUILDMODE="RELEASE"
IF NOT [%2]==[] (set BUILDMODE="%2")
if %TARGET%=="Default" (SET RunBuild=1)
if %TARGET%=="IntegrationTests" (SET RunBuild=1)
if %TARGET%=="CreateGroupSharePackage" (SET RunBuild=1)
if NOT "%RunBuild%"=="" (
"tools\FAKE.Core\tools\Fake.exe" "build.fsx" "target=BuildApp" "buildMode=%BUILDMODE%"
)
"tools\FAKE.Core\tools\Fake.exe" "build.fsx" "target=%TARGET%" "buildMode=%BUILDMODE%"
:Quit
exit /b %errorlevel%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment