Allow to specify the build mode.

This commit is contained in:
Steffen Forkmann
2013-11-02 00:12:29 +01:00
parent 284144185e
commit 84cf1755f2
2 changed files with 10 additions and 5 deletions
+5 -2
View File
@@ -9,8 +9,11 @@ if not exist tools\FAKE.Core\tools\Fake.exe (
SET TARGET="Default"
IF NOT [%1]==[] (set TARGET="%1")
"tools\FAKE.Core\tools\Fake.exe" "build.fsx" "target=%TARGET%"
SET BUILDMODE="Release"
IF NOT [%2]==[] (set BUILDMODE="%2")
"tools\FAKE.Core\tools\Fake.exe" "build.fsx" "target=%TARGET%" "buildMode=%BUILDMODE%"
rem Bail if we're running a TeamCity build.
if defined TEAMCITY_PROJECT_NAME goto Quit
+5 -3
View File
@@ -24,6 +24,8 @@ let releaseNotes =
ReadFile "ReleaseNotes.md"
|> ReleaseNotesHelper.parseReleaseNotes
let buildMode = getBuildParamOrDefault "buildMode" "Release"
Target "Clean" (fun _ ->
CleanDirs [buildDir; reactiveBuildDir; testResultsDir; packagingRoot; packagingDir; reactivePackagingDir]
)
@@ -38,12 +40,12 @@ Target "AssemblyInfo" (fun _ ->
)
Target "BuildApp" (fun _ ->
MSBuildWithDefaults "Build" ["./Octokit.sln"]
MSBuild null "Build" ["Configuration", buildMode] ["./Octokit.sln"]
|> Log "AppBuild-Output: "
)
Target "UnitTests" (fun _ ->
!! "./Octokit.Tests/bin/Release/**/Octokit.Tests*.dll"
!! (sprintf "./Octokit.Tests/bin/%s/**/Octokit.Tests*.dll" buildMode)
|> xUnit (fun p ->
{p with
XmlOutput = true
@@ -52,7 +54,7 @@ Target "UnitTests" (fun _ ->
Target "IntegrationTests" (fun _ ->
if hasBuildParam "OCTOKIT_GITHUBUSERNAME" && hasBuildParam "OCTOKIT_GITHUBPASSWORD" then
!! "./Octokit.Tests.Integration/bin/Release/**/Octokit.Tests.Integration.dll"
!! (sprintf "./Octokit.Tests.Integration/bin/%s/**/Octokit.Tests.Integration.dll" buildMode)
|> xUnit (fun p ->
{p with
XmlOutput = true