forked from picklesdoc/pickles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chocolatey.fsx
125 lines (109 loc) · 4.19 KB
/
chocolatey.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
// include Fake lib
#r @"packages\FAKE\tools\FakeLib.dll"
open Fake
// Properties
let cmdDir = "./build/exe/"
let guiDir = "./build/gui/"
let deployDir = "./deploy/chocolatey/"
let packagingDir = "./packaging/"
let chocoDir = "./chocolatey/"
// version info
let version = environVar "version" // or retrieve from CI server
Target "Clean" (fun _ ->
CleanDirs [deployDir; packagingDir]
)
Target "CreatePackage CMD" (fun _ ->
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 + "PicklesDoc.Pickles.DocumentationBuilders.Markdown.dll";
cmdDir + "System.IO.Abstractions.dll";
cmdDir + "FeatureSwitcher.dll";
cmdDir + "Strike.Jint.dll";
cmdDir + "Jint.dll";
cmdDir + "pickles.exe";
cmdDir + "NLog.config";
"./LICENSE.txt";
"./VERIFICATION.txt";]
WriteFile (packagingDir + "version.ps1") [("$version = \"" + version + "\"")]
NuGet (fun p ->
{p with
OutputPath = deployDir
WorkingDir = packagingDir
Version = version
Publish = false })
(chocoDir + "Pickles.nuspec")
)
Target "CreatePackage GUI" (fun _ ->
CopyFiles packagingDir [
guiDir + "Autofac.dll";
guiDir + "ClosedXML.dll";
guiDir + "DocumentFormat.OpenXml.dll";
guiDir + "GalaSoft.MvvmLight.dll";
guiDir + "GalaSoft.MvvmLight.Extras.dll";
guiDir + "GalaSoft.MvvmLight.Platform.dll";
guiDir + "Gherkin.dll";
guiDir + "MahApps.Metro.dll";
guiDir + "MarkdownDeep.dll";
guiDir + "CommonServiceLocator.dll";
guiDir + "ControlzEx.dll";
guiDir + "Newtonsoft.Json.dll";
guiDir + "NLog.dll";
guiDir + "NlogViewer.dll";
guiDir + "Ookii.Dialogs.Wpf.dll";
guiDir + "PicklesDoc.Pickles.Library.dll";
guiDir + "PicklesDoc.Pickles.ObjectModel.dll";
guiDir + "PicklesDoc.Pickles.TestFrameworks.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Cucumber.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Word.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Excel.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Json.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Html.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Dhtml.dll";
guiDir + "PicklesDoc.Pickles.DocumentationBuilders.Markdown.dll";
guiDir + "System.IO.Abstractions.dll";
guiDir + "FeatureSwitcher.dll";
guiDir + "Strike.Jint.dll";
guiDir + "Jint.dll";
guiDir + "System.Windows.Interactivity.dll";
guiDir + "picklesui.exe";
guiDir + "NLog.config";
guiDir + "PicklesUI.exe.config";
"./LICENSE.txt";
"./VERIFICATION.txt";]
WriteFile (packagingDir + "version.ps1") [("$version = \"" + version + "\"")]
WriteFile (packagingDir + "picklesui.exe.gui") [("")]
NuGet (fun p ->
{p with
OutputPath = deployDir
WorkingDir = packagingDir
Version = version
Publish = false })
(chocoDir + "picklesui.nuspec")
)
Target "Default" (fun _ ->
trace ("Starting build of Pickles version " + version)
DeleteDir packagingDir
)
// Dependencies
"Clean"
==> "CreatePackage CMD"
==> "CreatePackage GUI"
==> "Default"
// start build
RunTargetOrDefault "Default"