mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-04 19:26:51 +00:00
Allow to specify the build mode.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user