forked from scriptcs/scriptcs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.fsx
70 lines (62 loc) · 1.57 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
62
63
64
65
66
67
68
69
70
#r "packages/FAKE/tools/FakeLib.dll"
open Fake
open Fake.DotNetCli
open Fake.Testing
open System.IO
Target "Clean" (fun _ ->
!! "artifacts" ++ "src/*/bin" ++ "test/*/bin" ++ "src/*/obj" ++ "test/*/obj"
|> DeleteDirs
)
Target "Build" (fun _ ->
DotNetCli.Restore id
"ScriptCs.sln"
|> MSBuildHelper.build (fun p ->
{ p with
RestorePackagesFlag = true
Verbosity = Some Minimal
Targets = [ "Build" ]
Properties =
[
"Optimize", "True"
"Configuration", "Release"
]
} )
)
Target "Test" (fun _ ->
#if MONO
!! "test/**/bin/**/*Tests.Acceptance.dll"
|> xUnit2 (fun c ->
{c with
MaxThreads = CollectionConcurrencyMode.MaxThreads 1
})
#else
!! "test/**/*Tests*.csproj"
|> Seq.iter (fun p ->
DotNetCli.Test (fun c ->
{c with
WorkingDir = Path.GetDirectoryName p
AdditionalArgs = ["--no-build"]
})
)
#endif
)
Target "Pack" (fun _ ->
"ScriptCs.sln"
|> MSBuildHelper.build (fun p ->
{ p with
RestorePackagesFlag = true
Verbosity = Some Minimal
Targets = [ "Pack" ]
Properties =
[
"Optimize", "True"
"Configuration", "Release"
"PackageOutputPath", "../../artifacts"
]
} )
)
"Clean"
==> "Build"
==> "Test"
==> "Pack"
RunTargetOrDefault "Pack"