-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.fsx
67 lines (57 loc) · 1.88 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
67
#r "tools/FAKE/tools/FakeLib.dll"
open Fake
open Fake.AssemblyInfoFile
// Properties
let toolsDir = "./tools"
let buildDir = "./build"
let artifactsDir = "./artifacts"
let packagingDir = "./packaging"
let releaseNotesFile = "./ReleaseNotes.md"
let projectName = "ReactiveBluetooth"
let solutionAssemblyInfo = "./AssemblyInfo.cs"
let nuspecFile = "./ReactiveBluetooth.nuspec"
let releaseNotes =
ReadFile releaseNotesFile
|> ReleaseNotesHelper.parseReleaseNotes
// Target
Target "Clean" (fun _ ->
CleanDir packagingDir
CleanDir buildDir
)
Target "RestorePackages" (fun _ ->
RestorePackages()
)
Target "BuildRelease" (fun _ ->
MSBuildRelease buildDir "Build" !! ("ReactiveBluetooth*/*.csproj")
|> Log "ReleaseBuild:"
)
Target "AssemblyInfo" (fun _ ->
CreateCSharpAssemblyInfo solutionAssemblyInfo
[Attribute.Product projectName
Attribute.Version releaseNotes.AssemblyVersion
Attribute.FileVersion releaseNotes.AssemblyVersion]
)
Target "CreateNugetPackages" (fun _ ->
CreateDir artifactsDir
CopyFiles packagingDir !! (buildDir + "/ReactiveBluetooth.*.dll")
NuGet (fun p ->
{p with
Project = projectName
Version = releaseNotes.NugetVersion
Publish = false
OutputPath = artifactsDir
WorkingDir = packagingDir
Files= [
("ReactiveBluetooth.*", Some "lib\\portable-net45+netcore45+wpa81\\", Some "**\\*.pdb;*iOS*;*Android*" )
("ReactiveBluetooth.*", Some "lib\\Xamarin.iOS1.0\\", Some "**\\*.pdb;*Android*" )
("ReactiveBluetooth.*", Some "lib\\MonoAndroid1.0\\", Some "**\\*.pdb;*iOS*" )
]
}) nuspecFile
)
// Dependencies
"Clean"
==> "RestorePackages"
==> "AssemblyInfo"
==> "BuildRelease"
==> "CreateNugetPackages"
RunTargetOrDefault "CreateNugetPackages"