-
Notifications
You must be signed in to change notification settings - Fork 25
/
build.fsx
41 lines (35 loc) · 979 Bytes
/
build.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// include Fake lib
#r @"packages/build/FAKE/tools/FakeLib.dll"
open Fake
// Properties
let mode = getBuildParamOrDefault "mode" "Release"
let buildDir = "./bin/" + mode + "/"
// Targets
Target "Clean" (fun _ ->
CleanDir buildDir
"Cleaning " + mode + " configuration" |> trace
!! "src/**/*.csproj"
|>
match mode.ToLower() with
| "release" -> MSBuildRelease null "Clean"
| _ -> MSBuildDebug null "Clean"
|> Log "AppBuild-Output: "
)
Target "Build" (fun _ ->
"Building " + mode + " configuration" |> trace
!! "src/**/*.csproj"
|>
match mode.ToLower() with
| "release" -> MSBuildRelease null "Build"
| _ -> MSBuildDebug null "Build"
|> Log "AppBuild-Output: "
)
Target "Default" (fun _ ->
()
)
// Dependencies
"Clean"
==> "Build"
==> "Default"
// start build
RunTargetOrDefault "Default"