forked from SaladLab/Json.Net.Unity3D
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.fsx
59 lines (44 loc) · 1.36 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
#I @"packages/FAKE/tools"
#I @"packages/FAKE.BuildLib/lib/net451"
#r "FakeLib.dll"
#r "BuildLib.dll"
open Fake
open Fake.FileHelper
open BuildLib
open System.IO
let solution =
initSolution
"./Json.Net.Unity3D.sln" "Release" []
Target "Clean" <| fun _ -> cleanBin
Target "Restore" <| fun _ -> restoreNugetPackages solution
Target "Build" <| fun _ ->
// Regular
buildSolution solution
// Lite
!!solution.SolutionFile
|> MSBuild "" "Rebuild" [ "Configuration", solution.Configuration + "Lite" ]
|> Log "Build-Output: "
Target "Test" <| fun _ ->
let nunitRunnerDir = lazy ((getNugetPackage "NUnit.Runners" "2.6.4") @@ "tools")
ensureDirectory testDir
!! ("./src/**/bin/" + solution.Configuration + "/*.Tests.dll")
|> NUnit (fun p ->
{p with ToolPath = nunitRunnerDir.Force()
DisableShadowCopy = true;
OutputFile = testDir @@ "test.xml" })
Target "PackUnity" <| fun _ ->
packUnityPackage "./src/UnityPackage/JsonNet.unitypackage.json"
packUnityPackage "./src/UnityPackage/JsonNet-Lite.unitypackage.json"
Target "Pack" <| fun _ -> ()
Target "CI" <| fun _ -> ()
Target "Help" <| fun _ ->
showUsage solution (fun _ -> None)
"Clean"
==> "Restore"
==> "Build"
==> "Test"
"Build" ==> "PackUnity"
"PackUnity" ==> "Pack"
"Test" ==> "CI"
"Pack" ==> "CI"
RunTargetOrDefault "Help"