forked from FluentLayout/Cirrious.FluentLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.fsx
40 lines (29 loc) · 969 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
#r @"packages/FAKE.4.21.0/tools/NuGet.Core.dll"
#r @"packages/FAKE.4.21.0/tools/FakeLib.dll"
open System.IO
open System.Linq
open Fake
let exec command args =
let result = Shell.Exec(command, args)
if result <> 0 then failwithf "%s exited with error %d" command result
Target "restore" (fun () ->
exec "tools/nuget.exe" "restore QuickLayout.sln"
)
Target "build" (fun () ->
MSBuild null "Build" [ "Configuration", "Release" ] [ "QuickLayout.sln" ]
|> ignore
)
Target "nuget-package" (fun () ->
if Directory.Exists("dist") then Directory.Delete("dist", true)
Directory.CreateDirectory("dist") |> ignore
exec "tools/nuget.exe" "pack nuspec/Cirrious.FluentLayout.nuspec -NoDefaultExcludes -OutputDirectory dist"
)
Target "nuget-push" (fun () ->
let nupkgPath = Directory.EnumerateFiles("dist", "*.nupkg").First()
exec "tools/nuget.exe" ("push " + nupkgPath)
)
"restore"
==> "build"
==> "nuget-package"
==> "nuget-push"
RunTarget()