-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.cake
54 lines (48 loc) · 1.57 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
var target = Argument("target", "Pack");
var configuration = Argument("configuration", "Release");
var output = Argument("output", IsRunningOnWindows() ? "C:\\Packages" : "~/Packages");
Task("Clean")
.Does(() =>
{
CleanDirectories("src/**/bin");
CleanDirectories("src/**/obj");
});
Task("MGBuild")
//.IsDependentOn("Clean")
.Does(() =>
{
DotNetCoreBuild("src/MagicGradients/MagicGradients.csproj", new DotNetCoreBuildSettings()
{
Configuration = configuration
});
});
Task("MGPack")
.IsDependentOn("MGBuild")
.Does(() =>
{
DotNetCorePack("src/MagicGradients/MagicGradients.csproj", new DotNetCorePackSettings()
{
Configuration = configuration,
NoBuild = true,
NoRestore = true,
//IncludeSymbols = true,
//SymbolPackageFormat = "snupkg",
OutputDirectory = output
});
});
Task("Pack")
//.IsDependentOn("Clean")
.Does(() =>
{
var settings = new MSBuildSettings()
.SetConfiguration(configuration)
//.SetIncludeSymbols(true)
//.SetSymbolPackageFormat("snupkg")
.WithRestore()
.WithTarget("Pack")
.WithProperty("PackageOutputPath", output);
MSBuild("src/MagicGradients.Core/MagicGradients.Core.csproj", settings);
MSBuild("src/MagicGradients.Forms/MagicGradients.Forms.csproj", settings);
MSBuild("src/MagicGradients.Forms.Skia/MagicGradients.Forms.Skia.csproj", settings);
});
RunTarget(target);