-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cake
38 lines (31 loc) · 829 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 = Argument("target", "Default");
var configuration = Argument("configuration", "Debug");
var buildDir = Directory("./src/ComplexCalculator/bin") + Directory(configuration);
var testPath = "./src/ComplexCalculator.Tests/bin/"+ configuration + "/*.Tests.dll";
var solutionPath = "src/ComplexCalculator/ComplexCalculator.sln";
Task("Clean")
.Does(() =>
{
CleanDirectory(buildDir);
});
Task("Restore-Nuget-Packages")
.IsDependentOn("Clean")
.Does(() =>
{
NuGetRestore(solutionPath);
});
Task("Build")
.IsDependentOn("Restore-Nuget-Packages")
.Does(() =>
{
MSBuild(solutionPath, settings => settings.SetConfiguration(configuration));
});
Task("Run-Unit-Tests")
.IsDependentOn("Build")
.Does(() =>
{
MSTest(testPath);
});
Task("Default")
.IsDependentOn("Run-Unit-Tests");
RunTarget(target);