forked from reddog-io/RedDog.Search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.fsx
66 lines (54 loc) · 1.65 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 client SDK for Microsoft Azure Search."
let productName = "Red Dog"
let version = environVarOrDefault "version" "0.2.1.0"
let buildDir = "./build/output/"
let packagingDir = "./build/packages/"
Target "Clean" (fun _ ->
CleanDir buildDir
)
Target "Build" (fun _ ->
CreateCSharpAssemblyInfo "./src/RedDog.Search/Properties/AssemblyInfo.cs"
[Attribute.Title "RedDog.Search"
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 net45Dir = workingDir @@ "lib/net45/"
CleanDirs [workingDir; net45Dir]
CopyFile net45Dir (buildDir @@ "RedDog.Search.dll")
// Package RedDog.Engine
NuGet (fun p ->
{p with
Authors = author
Project = "RedDog.Search"
Description = productDescription
OutputPath = packagingDir
Summary = productDescription
WorkingDir = workingDir
Version = version }) "./packaging/RedDog.Search.nuspec"
)
// Default target
Target "Default" (fun _ ->
let msg = "Building RedDog.Search version: " + version
trace msg
)
// Dependencies
"Clean"
==> "Build"
==> "Package"
==> "Default"
// Start Build
RunTargetOrDefault "Default"