-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.fsx
61 lines (51 loc) · 1.49 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
55
56
57
58
59
60
61
#r @"packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake.FileHelper
open Fake.Testing.NUnit3
RestorePackages()
let buildDir = "build"
let nunit3 = "./packages/NUnit.ConsoleRunner/tools/nunit3-console.exe"
CreateDir buildDir
Target "Clean" (fun _ ->
CleanDir "build"
)
Target "Compile" (fun _ ->
let buildMode = getBuildParamOrDefault "buildMode" "Release"
let setParams defaults =
{ defaults with
Verbosity = Some(Quiet)
Targets = ["Build"]
Properties =
[
"Optimize", "True"
"DebugSymbols", "True"
"Configuration", buildMode
]
}
build setParams "./Archetype.sln"
|> DoNothing
)
Target "Test" (fun _ ->
!! ("src/**/bin/Release/*.Tests.dll")
|> NUnit3 (fun p ->
{p with
ShadowCopy = false
WorkingDir = "./build"
ToolPath = nunit3 })
)
Target "CreatePackage" (fun _ ->
NuGet (fun p ->
{p with
Files = [
(@"src/Archetype/bin/Release/Archetype.dll", Some "lib/net452", None)
]
OutputPath = "./build"
WorkingDir = "."
ToolPath = "packages/NuGet.CommandLine/tools/NuGet.exe"
Version = "1.0.0"}) "Archetype.nuspec"
)
"Clean"
==> "Compile"
==> "Test"
==> "CreatePackage"
RunTargetOrDefault "CreatePackage"