forked from picklesdoc/pickles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.fsx
97 lines (81 loc) · 2.44 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
open Fake
open Fake.AssemblyInfoFile
// Properties
let buildDir = "./build/"
let cmdDir = "./build/exe/"
let msBuildDir = "./build/msbuild/"
let nantDir = "./build/nant/"
let powerShellDir = "./build/powershell/"
let guiDir = "./build/gui/"
let testDir = "./test/"
let deployDir = "./deploy/"
// version info
let version = environVar "version" // or retrieve from CI server
// Targets
Target "Clean" (fun _ ->
CleanDirs [cmdDir; msBuildDir; nantDir; powerShellDir; guiDir; buildDir; testDir; deployDir]
)
Target "AssemblyInfo" (fun _ ->
CreateCSharpAssemblyInfo "./src/Pickles/VersionInfo.cs"
[Attribute.Product "Pickles"
Attribute.Company "Pickles"
Attribute.Copyright "Copyright (c) Jeffrey Cameron 2010-2012, PicklesDoc 2012-present"
Attribute.Trademark ""
Attribute.Culture ""
Attribute.ComVisible false
Attribute.Version version
Attribute.FileVersion version]
)
Target "BuildCmd" (fun _ ->
!! "src/Pickles/Pickles.CommandLine/Pickles.CommandLine.csproj"
|> MSBuildRelease cmdDir "Build"
|> Log "AppBuild-Output: "
)
Target "BuildMsBuild" (fun _ ->
!! "src/Pickles/Pickles.MsBuild/Pickles.MsBuild.csproj"
|> MSBuildRelease msBuildDir "Build"
|> Log "AppBuild-Output: "
)
Target "BuildNAnt" (fun _ ->
!! "src/Pickles/Pickles.NAnt/Pickles.NAnt.csproj"
|> MSBuildRelease nantDir "Build"
|> Log "AppBuild-Output: "
)
Target "BuildPowerShell" (fun _ ->
!! "src/Pickles/Pickles.PowerShell/Pickles.PowerShell.csproj"
|> MSBuildRelease powerShellDir "Build"
|> Log "AppBuild-Output: "
)
Target "BuildGui" (fun _ ->
!! "src/Pickles/Pickles.UserInterface/Pickles.UserInterface.csproj"
|> MSBuildRelease guiDir "Build"
|> Log "AppBuild-Output: "
)
Target "BuildTest" (fun _ ->
!! "src/Pickles/Pickles.Test/Pickles.Test.csproj"
|> MSBuildRelease testDir "Build"
|> Log "AppBuild-Output: "
)
Target "Zip" (fun _ ->
!! (buildDir + "/**/*.*")
-- "*.zip"
|> Zip buildDir (deployDir + "Pickles-" + version + ".zip")
)
Target "Default" (fun _ ->
trace ("Starting build of Pickles version " + version)
)
// Dependencies
"Clean"
==> "AssemblyInfo"
==> "BuildCmd"
==> "BuildMsBuild"
==> "BuildNAnt"
==> "BuildPowerShell"
==> "BuildGui"
==> "BuildTest"
==> "Zip"
==> "Default"
// start build
RunTargetOrDefault "Default"