-
Notifications
You must be signed in to change notification settings - Fork 21
/
build.cake
executable file
·40 lines (34 loc) · 1.04 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
var TARGET = Argument ("target", Argument ("t", "Default"));
var VERSION = EnvironmentVariable ("APPVEYOR_BUILD_VERSION") ?? Argument("version", "0.0.9999");
var CONFIG = Argument("configuration", EnvironmentVariable ("CONFIGURATION") ?? "Release");
var SLN = "./FormsToolkit.sln";
Task("Libraries").Does(()=>
{
NuGetRestore (SLN);
MSBuild (SLN, c => {
c.Configuration = CONFIG;
c.MSBuildPlatform = Cake.Common.Tools.MSBuild.MSBuildPlatform.x86;
});
});
Task ("NuGet")
.IsDependentOn ("Libraries")
.Does (() =>
{
if(!DirectoryExists("./Build/nuget/"))
CreateDirectory("./Build/nuget");
NuGetPack ("./FormsToolkit.nuspec", new NuGetPackSettings {
Version = VERSION,
OutputDirectory = "./Build/nuget/",
BasePath = "./"
});
});
//Build the component, which build samples, nugets, and libraries
Task ("Default").IsDependentOn("NuGet");
Task ("Clean").Does (() =>
{
CleanDirectory ("./component/tools/");
CleanDirectories ("./Build/");
CleanDirectories ("./**/bin");
CleanDirectories ("./**/obj");
});
RunTarget (TARGET);