-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.fsx
54 lines (45 loc) · 1.18 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
// include Fake lib
#r "packages/FAKE/tools/FakeLib.dll"
open System
open System.IO
open Fake
open Fake.Testing
open Fake.AssemblyInfoFile
// Properties
let buildDir = "./build/"
let testDir = "./test/"
//http://semver.org
let version =
sprintf "%s" "0.0.1"
// Targets
Target "Clean" (fun _ ->
CleanDir buildDir
CleanDir testDir
)
Target "BuildTest" (fun _ ->
!! "tests/FSharp.SSEClient.Tests.fsproj"
|> MSBuildDebug testDir "Build"
|> Log "App-Output: "
)
Target "Test" (fun _ ->
!! (testDir @@ "FSharp.SSEClient.Tests.dll")
|> NUnit3 (fun p -> {p with ResultSpecs = [currentDirectory @@ "TestResult.xml;format=nunit2"]})
)
Target "BuildSSEClient" (fun _ ->
CreateFSharpAssemblyInfo "./src/AssemblyInfo.fs"
[Attribute.Title "FSharp.SSEClient"
Attribute.Description "SSE Client"
Attribute.Product "FSharp.SSEClient"
Attribute.Version version
Attribute.FileVersion version]
!! "src/FSharp.SSEClient.Tests.fsproj"
|> MSBuildRelease buildDir "Build"
|> Log "AppBuild-Output: "
)
// Dependencies
"Clean"
==> "BuildSSEClient"
==> "BuildTest"
==> "Test"
// start build
RunTargetOrDefault "Test"