-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.cake
107 lines (96 loc) · 2.87 KB
/
build.cake
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
var target = Argument("target", "Cleanup");
var configuration = Argument("configuration", "Release");
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Clean")
.WithCriteria(c => HasArgument("rebuild"))
.Does(() =>
{
CleanDirectory($"./RMMVCookTool.CLI/bin/{configuration}");
CleanDirectory($"./RMMVCookTool.CLI/obj/{configuration}");
CleanDirectory($"./RMMVCookTool.Core/bin/{configuration}");
CleanDirectory($"./RMMVCookTool.Core/obj/{configuration}");
CleanDirectory($"./RMMVCookTool.GUI/bin/{configuration}");
CleanDirectory($"./RMMVCookTool.GUI/obj/{configuration}");
});
Task("BuildUI")
.IsDependentOn("Clean")
.WithCriteria(c => HasArgument("buildUi"))
.Does(() =>
{
DotNetBuild("./RMMVCookTool.GUI", new DotNetBuildSettings
{
Configuration = configuration,
});
});
Task("BuildCLI")
.IsDependentOn("Clean")
.WithCriteria(c => HasArgument("buildCli"))
.Does(() =>
{
DotNetBuild("./RMMVCookTool.CLI", new DotNetBuildSettings
{
Configuration = configuration,
});
});
Task("PublishUI")
.IsDependentOn("Clean")
.WithCriteria(c => HasArgument("publishUi"))
.Does(() =>
{
DotNetPublish("./RMMVCookTool.GUI", new DotNetPublishSettings
{
Configuration = configuration,
SelfContained = true,
ArgumentCustomization = args => args.Append("-a x64")
});
});
Task("PublishCLI")
.IsDependentOn("Clean")
.WithCriteria(c => HasArgument("publishCli"))
.Does(() =>
{
DotNetPublish("./RMMVCookTool.CLI", new DotNetPublishSettings
{
Configuration = configuration,
SelfContained = true,
ArgumentCustomization = args => args.Append("-a x64")
});
});
Task("PublishUIOnArm")
.IsDependentOn("Clean")
.WithCriteria(c => HasArgument("publishUiOnArm"))
.Does(() =>
{
DotNetPublish("./RMMVCookTool.GUI", new DotNetPublishSettings
{
Configuration = configuration,
SelfContained = true,
ArgumentCustomization = args => args.Append("-a arm64")
});
});
Task("PublishCLIOnArm")
.IsDependentOn("Clean")
.WithCriteria(c => HasArgument("publishCliOnArm"))
.Does(() =>
{
DotNetPublish("./RMMVCookTool.CLI", new DotNetPublishSettings
{
Configuration = configuration,
SelfContained = true,
ArgumentCustomization = args => args.Append("-a arm64")
});
});
Task("Cleanup")
.IsDependentOn("Clean")
.IsDependentOn("BuildUI")
.IsDependentOn("BuildCLI")
.IsDependentOn("PublishUI")
.IsDependentOn("PublishCLI")
.IsDependentOn("PublishUIOnArm")
.IsDependentOn("PublishCLIOnArm");
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);