-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.fsx
37 lines (29 loc) · 903 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
#r @"packages\FAKE\tools\FakeLib.dll"
open Fake
let buildDir = "output"
let clean() =
CleanDir buildDir
let compileSrcSln () =
!! "src/*.sln"
|> MSBuildRelease buildDir "Build"
|> Log "Compile-Output: "
let runFuchuTests() =
let errorCode =
!! (buildDir </> "*.spec.exe")
|> Seq.map (fun p -> if not isMono then p,null else "mono",p)
|> Seq.map (fun (p,a) -> asyncShellExec { defaultParams with Program = p; CommandLine = a })
|> Async.Parallel
|> Async.RunSynchronously
|> Array.sum
if errorCode <> 0
then failwith "Unit tests failed"
Target "clean" clean
Target "compile" compileSrcSln
Target "test" runFuchuTests
Target "rebuild" DoNothing
"clean" ==> "rebuild"
"clean" ?=> "compile"
"compile" ==> "rebuild"
"compile" ?=> "test"
"test" ==> "rebuild"
RunTargetOrDefault "rebuild"