-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.cake
46 lines (39 loc) · 1.19 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
var target = Argument("target", "Publish");
var configuration = Argument("configuration", "Release");
var solutionFolder = "./";
var mainProjectPath = "./Visu/Visu.csproj";
var outputFolder = "./visu-app/";
Task("Clean")
.Does(()=> {
CleanDirectory(outputFolder);
});
Task("Restore")
.Does(()=>{
DotNetCoreRestore(solutionFolder);
});
Task("Build")
.IsDependentOn("Clean")
.IsDependentOn("Restore")
.Does(()=> {
DotNetCoreBuild(solutionFolder, new DotNetCoreBuildSettings {
NoRestore = true,
Configuration = configuration
});
});
Task("Test")
.IsDependentOn("Build")
.Does(()=> {
DotNetCoreTest(solutionFolder);
});
Task("Publish")
.IsDependentOn("Test")
.Does(()=> {
DotNetCorePublish(mainProjectPath, new DotNetCorePublishSettings {
ArgumentCustomization = args=>args.Append("/p:DebugType=None"),
Configuration = configuration,
OutputDirectory = outputFolder,
PublishReadyToRun = true,
Runtime = "win-x64"
});
});
RunTarget(target);