forked from x97mdr/pickles
-
Notifications
You must be signed in to change notification settings - Fork 164
/
chocolatey.fsx
109 lines (93 loc) · 3.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
// 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 + "NGenerics.dll";
cmdDir + "NLog.dll";
cmdDir + "PicklesDoc.Pickles.Library.dll";
cmdDir + "PicklesDoc.Pickles.ObjectModel.dll";
cmdDir + "PicklesDoc.Pickles.TestFrameworks.dll";
cmdDir + "System.IO.Abstractions.dll";
cmdDir + "FeatureSwitcher.dll";
cmdDir + "Strike.Jint.dll";
cmdDir + "Jint.dll";
cmdDir + "pickles.exe";
cmdDir + "NLog.config" ]
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 + "Microsoft.Practices.ServiceLocation.dll";
guiDir + "NDesk.Options.dll";
guiDir + "Newtonsoft.Json.dll";
guiDir + "NGenerics.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 + "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"]
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"