-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathbuild.fsx
66 lines (54 loc) · 1.28 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
#I "packages/FAKE/tools"
#r "FakeLib.dll"
open System
open System.IO
open Fake
open Fake.AssemblyInfoFile
open Fake.ReleaseNotesHelper
type Project = {
ReleaseNotes: ReleaseNotes
SolutionFile: String
TestAssemblies: String
}
let project = {
ReleaseNotes = LoadReleaseNotes "RELEASE_NOTES.md"
SolutionFile = "WebApiContrib.Formatting.Jsonp.sln"
TestAssemblies = "test/**/bin/Release/*Tests*.dll"
}
Target "Clean" (fun _ ->
CleanDirs ["bin"; "temp"]
)
Target "Build" (fun _ ->
!! project.SolutionFile
|> MSBuildRelease "" "Rebuild"
|> ignore
)
Target "RunTests" (fun _ ->
!! project.TestAssemblies
|> NUnit (fun p ->
{ p with
DisableShadowCopy = true
TimeOut = TimeSpan.FromMinutes 20.
OutputFile = "TestResults.xml" })
)
Target "PackageNuget" (fun _ ->
Paket.Pack(fun p ->
{ p with
OutputPath = "bin"
Version = project.ReleaseNotes.NugetVersion
ReleaseNotes = toLines project.ReleaseNotes.Notes})
)
Target "PublishNuget" (fun _ ->
Paket.Push(fun p ->
{ p with
WorkingDir = "bin" })
)
Target "All" DoNothing
"Clean"
==> "Build"
==> "RunTests"
==> "All"
"All"
==> "PackageNuget"
==> "PublishNuget"
RunTargetOrDefault "All"