-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.cake
38 lines (30 loc) · 830 Bytes
/
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
var target = string.IsNullOrEmpty(Argument("target", "Default")) ? "Default" : Argument("target", "Default");
var sln = "./DXNugetPackageBuilder.sln";
Task("Clean")
.Does(() =>
{
DeleteDirectories(GetDirectories("./src/**/obj"), new DeleteDirectorySettings
{
Recursive = true
});
DeleteDirectories(GetDirectories("./src/**/bin"), new DeleteDirectorySettings
{
Recursive = true
});
});
Task("Copy-NuGet")
.Does(() =>
{
CreateDirectory("./src/DXNugetPackageBuilder/bin/Debug/net45");
CopyFileToDirectory("./tools/nuget.exe", "./src/DXNugetPackageBuilder/bin/Debug/net45");
});
Task("Restore")
.Does(() => NuGetRestore(sln));
Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.IsDependentOn("Copy-NuGet")
.Does(() => MSBuild(sln));
Task("Default")
.IsDependentOn("Build");
RunTarget(target);