forked from MatterHackers/MatterControl-Help
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cake
34 lines (26 loc) · 993 Bytes
/
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
#tool "nuget:?package=Wyam"
#addin "Cake.Powershell"
var RootDir = MakeAbsolute(Directory("."));
var buildtarget = Argument("target", "Default");
var wyamExe = RootDir + "/tools/Wyam.1.4.1/tools/net462/Wyam.exe";
Console.WriteLine(RootDir);
Console.WriteLine(wyamExe.Replace("/", "\\"));
Task("Build")
.Does(() => StartProcess(wyamExe, "build"));
Task("Preview")
.Does(() => StartProcess(wyamExe, "-p -w --virtual-dir \"/wyam-test\""));
/*
Task("Deploy")
.IsDependentOn("Build")
.Does(() =>
{
if(FileExists("./CNAME"))
CopyFile("./CNAME", "output/CNAME");
StartProcess("git", "checkout master");
StartProcess("git", "add .");
StartProcess("git", "commit -m \"Checking output in for subtree\"");
StartProcess("git", "subtree split --prefix output -b gh-pages");
StartProcess("git", "push -f origin gh-pages:gh-pages");
StartProcess("git", "branch -D gh-pages");
}); */
RunTarget(buildtarget);