-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.fsx
45 lines (34 loc) · 879 Bytes
/
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
// include Fake libs
#r "./packages/FAKE/tools/FakeLib.dll"
open Fake
// Directories
let buildDir = "./build/"
let deployDir = "./deploy/"
// Filesets
let appReferences =
!! "/src/Upiter/Upiter.fsproj"
++ "/src/Yoga/Yoga.fsproj"
// version info
let version = "0.1" // or retrieve from CI server
// Targets
Target "Clean" (fun _ ->
CleanDirs [buildDir; deployDir]
)
Target "Build" (fun _ ->
//MSBuildDefaults <-
// { MSBuildDefaults with Verbosity = Some(MSBuildVerbosity.Diagnostic) }
// compile all projects below src/app/
MSBuildDebug buildDir "Build" appReferences
|> Log "AppBuild-Output: "
)
Target "Deploy" (fun _ ->
!! (buildDir + "/**/*.*")
-- "*.zip"
|> Zip buildDir (deployDir + "Yoga." + version + ".zip")
)
// Build order
"Clean"
==> "Build"
==> "Deploy"
// start build
RunTargetOrDefault "Build"