This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.fsx
75 lines (52 loc) · 1.5 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
#r "paket:
source https://api.nuget.org/v3/index.json
framework: netstandard2.0
nuget Fake.Core
nuget Fake.Core.Target
nuget Fake.Core.ReleaseNotes
nuget Fake.DotNet.Cli
nuget Fake.DotNet.Paket //"
#load ".fake/build.fsx/intellisense.fsx"
open Fake.Core
open Fake.Core.TargetOperators
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.DotNet
module BuildPath =
let root = __SOURCE_DIRECTORY__
let bin = root </> "bin"
let nuget = bin </> "nuget"
let test = bin </> "test"
let sln = Directory.findFirstMatchingFile "*.sln" root
let releaseNotes = root </> "RELEASE_NOTES.md"
let releaseNotes = ReleaseNotes.load BuildPath.releaseNotes
let version =
releaseNotes.SemVer
Target.create "Clean" <| fun _ ->
Directory.delete BuildPath.bin
Target.create "Build" <| fun _ ->
DotNet.build (fun p ->
{ p with
Configuration = DotNet.BuildConfiguration.Release } )
BuildPath.sln
Target.create "Test" <| fun _ ->
DotNet.test (fun p ->
{ p with
Configuration = DotNet.BuildConfiguration.Release
NoBuild = true
ResultsDirectory = Some BuildPath.test } )
BuildPath.sln
Target.create "Nuget" <| fun _ ->
Paket.pack (fun p ->
{ p with
BuildConfig = "Release"
OutputPath = BuildPath.nuget
Version = version.AsString }
)
Target.create "All" ignore
"Clean"
==> "Build"
==> "Test"
==> "Nuget"
==> "All"
Target.runOrDefault "All"