-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.fsx
52 lines (43 loc) · 1.04 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
#load ".fake/build.fsx/intellisense.fsx"
#if !FAKE
#r "netstandard"
let execContext = Fake.Core.Context.FakeExecutionContext.Create false "build.fsx" []
Fake.Core.Context.setExecutionContext (Fake.Core.Context.RuntimeContext.Fake execContext)
#endif
open Fake.Core
open Fake.DotNet
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing.Operators
open Fake.Core.TargetOperators
Target.create "Clean" (fun _ ->
!! "src/**/bin"
++ "src/**/obj"
|> Shell.cleanDirs
)
Target.create "Restore" (fun _ ->
!! "src/**/*.*proj"
|> Seq.iter (DotNet.restore id)
)
Target.create "Build" (fun _ ->
!! "src/**/*.*proj"
|> Seq.iter (DotNet.build id)
)
Target.create "Pack" (fun _ ->
let nugetsDir = __SOURCE_DIRECTORY__ </> "releases"
!! "src/SwaggerForFsharp.Giraffe/*.fsproj"
|> Seq.iter (
DotNet.pack
<| fun settings ->
{ settings
with OutputPath=Some nugetsDir
}
)
)
Target.create "All" ignore
"Clean"
==> "Restore"
==> "Build"
==> "Pack"
==> "All"
Target.runOrDefault "All"