forked from rebuy-de/rb-forms-barcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.fsx
53 lines (43 loc) · 1.09 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
#I @"packages/FAKE/tools/"
#r @"FakeLib.dll"
open System
open Fake
open Fake.Git
open Fake.XamarinHelper
open Fake.ProcessHelper
Target "Clean" (fun _ ->
!! "./**/obj/"
++ "./**/bin/"
-- "./bin/"
|> CleanDirs
)
Target "Restore" (fun _ ->
!! "./**/packages.config"
|> Seq.iter (RestorePackage (fun defaults ->
{
defaults with
ToolPath = (if isMono then "/Library/Frameworks/Mono.framework/Versions/Current/Commands/nuget" else defaults.ToolPath )
}))
)
Target "Gradlew" (fun _ ->
let gradlew = (if isUnix then "gradle" else "gradlew.bat")
let result = Shell.Exec(gradlew, "build", "./RebuyCameraSource/")
if result <> 0 then failwithf "%s exited with error %d" gradlew result
)
Target "BuildSolution" (fun _ ->
[ "./Rb.Forms.Barcode.sln" ]
|> MSBuildRelease null "Build"
|> ignore
)
Target "Default" (fun _ ->
trace "Please choose a valid task"
)
Target "Build" (fun _ ->
"Clean"
==> "Restore"
==> "Gradlew"
==> "BuildSolution"
|> ignore
Run "BuildSolution"
)
RunTargetOrDefault "Default"