forked from picklesdoc/pickles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuget.fsx
141 lines (127 loc) · 5.25 KB
/
nuget.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
open Fake
// Properties
let deployDir = "./deploy/nuget/"
let cmdDir = "./build/exe/"
let msBuildDir = "./build/msbuild/"
let powerShellDir = "./build/powershell/"
let packagingDir = "./packaging/"
// version info
let version = environVar "version" // or retrieve from CI server
// Targets
Target "Clean" (fun _ ->
CleanDirs [deployDir; packagingDir; ]
)
Target "CreatePackageCommandLine" (fun _ ->
// Copy all the package files into a package folder
CopyFiles packagingDir [
cmdDir + "Autofac.dll";
cmdDir + "ClosedXML.dll";
cmdDir + "DocumentFormat.OpenXml.dll";
cmdDir + "Gherkin.dll";
cmdDir + "MarkdownDeep.dll";
cmdDir + "NDesk.Options.dll";
cmdDir + "Newtonsoft.Json.dll";
cmdDir + "NLog.dll";
cmdDir + "PicklesDoc.Pickles.Library.dll";
cmdDir + "PicklesDoc.Pickles.ObjectModel.dll";
cmdDir + "PicklesDoc.Pickles.TestFrameworks.dll";
cmdDir + "PicklesDoc.Pickles.DocumentationBuilders.Cucumber.dll";
cmdDir + "PicklesDoc.Pickles.DocumentationBuilders.Word.dll";
cmdDir + "PicklesDoc.Pickles.DocumentationBuilders.Excel.dll";
cmdDir + "PicklesDoc.Pickles.DocumentationBuilders.Json.dll";
cmdDir + "PicklesDoc.Pickles.DocumentationBuilders.Html.dll";
cmdDir + "PicklesDoc.Pickles.DocumentationBuilders.Dhtml.dll";
cmdDir + "System.IO.Abstractions.dll";
cmdDir + "FeatureSwitcher.dll";
cmdDir + "Strike.Jint.dll";
cmdDir + "Jint.dll";
cmdDir + "pickles.exe";
cmdDir + "NLog.config" ]
NuGet (fun p ->
{p with
OutputPath = deployDir
WorkingDir = packagingDir
Version = version
Publish = false })
"src/Pickles/Pickles.CommandLine/Pickles.CommandLine.nuspec"
)
Target "CreatePackageMsBuild" (fun _ ->
// Copy all the package files into a package folder
CopyFiles packagingDir [
msBuildDir + "Autofac.dll";
msBuildDir + "ClosedXML.dll";
msBuildDir + "DocumentFormat.OpenXml.dll";
msBuildDir + "Gherkin.dll";
msBuildDir + "MarkdownDeep.dll";
msBuildDir + "Newtonsoft.Json.dll";
msBuildDir + "NLog.dll";
msBuildDir + "PicklesDoc.Pickles.Library.dll";
msBuildDir + "PicklesDoc.Pickles.ObjectModel.dll";
msBuildDir + "PicklesDoc.Pickles.TestFrameworks.dll";
msBuildDir + "PicklesDoc.Pickles.DocumentationBuilders.Cucumber.dll";
msBuildDir + "PicklesDoc.Pickles.DocumentationBuilders.Word.dll";
msBuildDir + "PicklesDoc.Pickles.DocumentationBuilders.Excel.dll";
msBuildDir + "PicklesDoc.Pickles.DocumentationBuilders.Json.dll";
msBuildDir + "PicklesDoc.Pickles.DocumentationBuilders.Html.dll";
msBuildDir + "PicklesDoc.Pickles.DocumentationBuilders.Dhtml.dll";
msBuildDir + "System.IO.Abstractions.dll";
msBuildDir + "FeatureSwitcher.dll";
msBuildDir + "Strike.Jint.dll";
msBuildDir + "Jint.dll";
msBuildDir + "PicklesDoc.Pickles.MSBuild.Tasks.dll";
msBuildDir + "build/Pickles.MSBuild.targets";]
NuGet (fun p ->
{p with
OutputPath = deployDir
WorkingDir = packagingDir
Version = version
Publish = false })
"src/Pickles/Pickles.MSBuild/Pickles.MSBuild.nuspec"
)
Target "CreatePackagePowerShell" (fun _ ->
// Copy all the package files into a package folder
CopyFiles packagingDir [
powerShellDir + "Autofac.dll";
powerShellDir + "ClosedXML.dll";
powerShellDir + "DocumentFormat.OpenXml.dll";
powerShellDir + "Gherkin.dll";
powerShellDir + "MarkdownDeep.dll";
powerShellDir + "Newtonsoft.Json.dll";
powerShellDir + "NLog.dll";
powerShellDir + "PicklesDoc.Pickles.Library.dll";
powerShellDir + "PicklesDoc.Pickles.ObjectModel.dll";
powerShellDir + "PicklesDoc.Pickles.TestFrameworks.dll";
powerShellDir + "PicklesDoc.Pickles.PowerShell.dll";
powerShellDir + "PicklesDoc.Pickles.DocumentationBuilders.Cucumber.dll";
powerShellDir + "PicklesDoc.Pickles.DocumentationBuilders.Word.dll";
powerShellDir + "PicklesDoc.Pickles.DocumentationBuilders.Excel.dll";
powerShellDir + "PicklesDoc.Pickles.DocumentationBuilders.Json.dll";
powerShellDir + "PicklesDoc.Pickles.DocumentationBuilders.Html.dll";
powerShellDir + "PicklesDoc.Pickles.DocumentationBuilders.Dhtml.dll";
powerShellDir + "System.IO.Abstractions.dll";
powerShellDir + "FeatureSwitcher.dll";
powerShellDir + "Strike.Jint.dll";
powerShellDir + "Jint.dll";
"src/Pickles/Pickles.PowerShell/init.ps1" ]
NuGet (fun p ->
{p with
OutputPath = deployDir
WorkingDir = packagingDir
Version = version
Publish = false })
"src/Pickles/Pickles.PowerShell/Pickles.nuspec"
)
Target "CreatePackage" (fun _ ->
trace ("Starting build of nuget packages version " + version)
DeleteDir packagingDir
)
// Dependencies
"Clean"
==> "CreatePackageCommandLine"
==> "CreatePackageMsBuild"
==> "CreatePackagePowerShell"
==> "CreatePackage"
// start build
RunTargetOrDefault "CreatePackage"