-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.fsx
45 lines (40 loc) · 794 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
#r "nuget: Fli"
open Fli
// Empty output directory
cli {
Shell PWSH
Command "Remove-Item * -Include *.nupkg"
WorkingDirectory "src/.nupkg/"
}
|> Command.execute
|> Output.toText
|> printfn "%s"
// Build in Release configuration
cli {
Exec "dotnet"
Arguments [| "build"; "-c"; "Release" |]
WorkingDirectory "src/"
}
|> Command.execute
|> Output.throwIfErrored
|> Output.toText
|> printfn "%s"
// Pack Nuget Package
cli {
Shell CMD
Command "paket pack .nupkg"
WorkingDirectory "src/"
}
|> Command.execute
|> Output.throwIfErrored
|> Output.toText
|> printfn "%s"
// Push Nuget Package
cli {
Shell PWSH
Command "paket push (Get-Item * -Include *.nupkg).Name"
WorkingDirectory "src/.nupkg/"
}
|> Command.execute
|> Output.toText
|> printfn "%s"