-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.cake
44 lines (34 loc) · 1.08 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
#tool "nuget:?package=xunit.runner.console"
var target = Argument("Target", "Default");
var solutionPath = "src/Cake.Storyteller.sln";
Task("Default")
.IsDependentOn("Build");
var VERSION_NUMBER = AppVeyor.IsRunningOnAppVeyor ? EnvironmentVariable("APPVEYOR_BUILD_VERSION") : "0.0.0";
Task("Build")
.Does(() => {
NuGetRestore(solutionPath);
DotNetBuild(solutionPath, settings => settings.Configuration = "Release");
});
Task("NuGetPack")
.Does(() => {
NuGetPack("./src/Cake.Storyteller.nuspec", new NuGetPackSettings {
OutputDirectory = "./",
Verbosity = NuGetVerbosity.Detailed,
Version = VERSION_NUMBER
});
});
Task("Clean")
.Does(() => {
CleanDirectories("./src/build");
CleanDirectories("./src/**/bin");
CleanDirectories("./src/**/obj");
CreateDirectory("./src/build");
});
Task("Test")
.Does(() => {
XUnit2(GetFiles("./src/**/bin/Debug/*.Tests.dll"));
});
Task("Ci")
.IsDependentOn("Default")
.IsDependentOn("NuGetPack");
RunTarget(target);