-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.fsx
56 lines (47 loc) · 1.18 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
#r "paket: groupref Build //"
#load ".fake/build.fsx/intellisense.fsx"
open Fake.Core
open Fake.Core.TargetOperators
open Fake.DotNet
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing.Operators
let deployDir = "deploy"
let release = File.read "RELEASE_NOTES.md" |> ReleaseNotes.parse
Target.create "Clean" (fun _ ->
!! "src/**/bin"
++ "src/**/obj"
|> Shell.cleanDirs
Shell.cleanDir deployDir
)
Target.create "Build" (fun _ ->
// Building XAML projects (such as the sample view projects) doesn't work
// yet using DotNet.build, so we skip those.
!! "src/Elmish.WPF/*.*proj"
|> Seq.iter (DotNet.build id)
)
Target.create "Test" (fun _ ->
"src/Elmish.WPF.Tests"
|> DotNet.test (fun opt ->
{ opt with Configuration = DotNet.BuildConfiguration.Release }
)
)
Target.create "Pack" (fun _ ->
Paket.pack (fun p ->
{ p with
OutputPath = deployDir
Symbols = true
Version = release.NugetVersion
ReleaseNotes =
release.Notes
|> Seq.map (sprintf "- %s")
|> String.toLines}
)
)
Target.create "Default" ignore
"Clean"
==> "Build"
==> "Test"
==> "Pack"
==> "Default"
Target.runOrDefault "Default"