-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.cake
36 lines (29 loc) · 1.13 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
var target = Argument("target", "Install");
var configuration = Argument("configuration", "Release");
var installFolder = Directory((EnvironmentVariable("LOCALAPPDATA")) + "/Colossal Order/Cities_Skylines/Addons/Mods/PrecisionEngineering");
//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////
Task("Clean")
//.WithCriteria(c => HasArgument("rebuild"))
.Does(() =>
{
CleanDirectory($"./src/PrecisionEngineering/bin/{configuration}");
CleanDirectory($"./src/PrecisionEngineering/obj/{configuration}");
});
Task("Build")
.IsDependentOn("Clean")
.Does(() =>
{
MSBuild("./src/PrecisionEngineering.sln", configurator => configurator.SetConfiguration(configuration));
});
Task("Install")
.IsDependentOn("Build")
.Does(() =>
{
CopyFileToDirectory($"./src/PrecisionEngineering/bin/{configuration}/PrecisionEngineering.dll", installFolder);
});
//////////////////////////////////////////////////////////////////////
// EXECUTION
//////////////////////////////////////////////////////////////////////
RunTarget(target);