-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.fsx
66 lines (54 loc) · 1.68 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
// include Fake lib
#r @"tools/fake/FakeLib.dll"
open Fake
open Fake.AssemblyInfoFile
let productDescription = "A job runner suited for running jobs in Microsoft Azure Worker Roles."
let productName = "Red Dog"
let version = environVarOrDefault "version" "1.0.0.0"
let buildDir = "./build/output/"
let packagingDir = "./build/packages/"
Target "Clean" (fun _ ->
CleanDir buildDir
)
Target "Build" (fun _ ->
CreateCSharpAssemblyInfo "./src/RedDog.Engine/Properties/AssemblyInfo.cs"
[Attribute.Title "RedDog.Engine"
Attribute.Description productDescription
Attribute.Product productName
Attribute.Version version
Attribute.FileVersion version]
// Build all projects.
!! "./src/**/*.csproj"
|> MSBuildRelease buildDir "Build"
|> Log "AppBuild-Output: "
)
Target "Package" (fun _ ->
let author = ["Sandrino Di Mattia"]
// Prepare RedDog.Engine.
let workingDir = packagingDir
let net40Dir = workingDir @@ "lib/net40/"
CleanDirs [workingDir; net40Dir]
CopyFile net40Dir (buildDir @@ "RedDog.Engine.dll")
// Package RedDog.Engine
NuGet (fun p ->
{p with
Authors = author
Project = "RedDog.Engine"
Description = productDescription
OutputPath = packagingDir
Summary = productDescription
WorkingDir = workingDir
Version = version }) "./packaging/RedDog.Engine.nuspec"
)
// Default target
Target "Default" (fun _ ->
let msg = "Building RedDog.Engine version: " + version
trace msg
)
// Dependencies
"Clean"
==> "Build"
==> "Package"
==> "Default"
// Start Build
RunTargetOrDefault "Default"