-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cake
59 lines (50 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
var target = Argument("target", "Default");
var tag = Argument("tag", "cake");
Task("Restore")
.Does(() =>
{
DotNetCoreRestore(".");
});
Task("Build")
.Does(() =>
{
var settings = new DotNetCoreBuildSettings
{
Framework = "netcoreapp1.1",
Configuration = "Release",
Runtime = "ubuntu.16.10-x64",
VersionSuffix = tag
};
DotNetCoreBuild(".", settings);
});
Task("Test")
.Does(() =>
{
var files = GetFiles("test/**/*.csproj");
foreach(var file in files)
{
DotNetCoreTest(file.ToString());
}
});
Task("Publish")
.Does(() =>
{
var settings = new DotNetCorePublishSettings
{
Framework = "netcoreapp1.1",
Configuration = "Release",
Runtime = "ubuntu.16.10-x64",
OutputDirectory = "./publish",
VersionSuffix = tag
};
DotNetCorePublish("src/NancyRealWorld", settings);
});
Task("Default")
.IsDependentOn("Restore")
.IsDependentOn("Build")
.IsDependentOn("Test")
.IsDependentOn("Publish");
Task("Rebuild")
.IsDependentOn("Restore")
.IsDependentOn("Build");
RunTarget(target);