-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.fsx
85 lines (62 loc) · 2.38 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#I @"packages/FAKE/tools"
#I @"packages/FAKE.BuildLib/lib/net451"
#r "FakeLib.dll"
#r "BuildLib.dll"
open Fake
open BuildLib
let solution =
initSolution
"./TemplateTable.sln" "Release"
[ { // Core Libraries
emptyProject with Name = "TemplateTable"
Folder = "./core/TemplateTable" }
{ // Plugin Libraries
emptyProject with Name = "TemplateTable.Json"
Folder = "./plugins/TemplateTable.Json"
Dependencies =
[ ("TemplateTable", "")
("Newtonsoft.Json", "") ] }
{ emptyProject with Name = "TemplateTable.Protobuf"
Folder = "./plugins/TemplateTable.Protobuf"
PackagePrerelease = "beta"
Dependencies =
[ ("TemplateTable", "")
("protobuf-net", "") ] } ]
Target "Clean" <| fun _ -> cleanBin
Target "AssemblyInfo" <| fun _ -> generateAssemblyInfo solution
Target "Restore" <| fun _ -> restoreNugetPackages solution
Target "Build" <| fun _ -> buildSolution solution
Target "Test" <| fun _ -> testSolution solution
Target "Cover" <| fun _ ->
coverSolutionWithParams
(fun p -> { p with Filter = "+[TemplateTable*]* -[*.Tests]*" })
solution
Target "Coverity" <| fun _ -> coveritySolution solution "SaladLab/TemplateTable"
Target "PackNuget" <| fun _ -> createNugetPackages solution
Target "PackUnity" <| fun _ ->
packUnityPackage "./core/UnityPackage/TemplateTable.unitypackage.json"
Target "Pack" <| fun _ -> ()
Target "PublishNuget" <| fun _ -> publishNugetPackages solution
Target "PublishUnity" <| fun _ -> ()
Target "Publish" <| fun _ -> ()
Target "CI" <| fun _ -> ()
Target "Help" <| fun _ ->
showUsage solution (fun _ -> None)
"Clean"
==> "AssemblyInfo"
==> "Restore"
==> "Build"
==> "Test"
"Build" ==> "Cover"
"Restore" ==> "Coverity"
let isPublishOnly = getBuildParam "publishonly"
"Build" ==> "PackNuget" =?> ("PublishNuget", isPublishOnly = "")
"Build" ==> "PackUnity" =?> ("PublishUnity", isPublishOnly = "")
"PackNuget" ==> "Pack"
"PackUnity" ==> "Pack"
"PublishNuget" ==> "Publish"
"PublishUnity" ==> "Publish"
"Test" ==> "CI"
"Cover" ==> "CI"
"Publish" ==> "CI"
RunTargetOrDefault "Help"