-
Notifications
You must be signed in to change notification settings - Fork 14
/
Jakefile
63 lines (53 loc) · 1.62 KB
/
Jakefile
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
60
61
62
63
/*
* Jakefile
* test
*
*/
require('./common.jake');
var ENV = require("system").env,
FILE = require("file"),
OS = require("os"),
JAKE = require("jake"),
task = JAKE.task,
CLEAN = require("jake/clean").CLEAN,
FileList = JAKE.FileList,
stream = require("narwhal/term").stream,
framework = require("cappuccino/jake").framework,
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Release";
framework ("CappuccinoResource", function(task)
{
task.setBuildIntermediatesPath(FILE.join("Build", "CappuccinoResource.build", configuration));
task.setBuildPath(FILE.join("Build", configuration));
task.setProductName("CappuccinoResource");
task.setIdentifier("org.sant0sk1.cappuccinoResource");
task.setVersion("1.0");
task.setAuthor("Jerod Santo");
task.setEmail("nospam @nospam@ jerodsanto.net");
task.setSummary("CappuccinoResource");
task.setSources(new FileList("Framework/CappuccinoResource/*.j"));
task.setInfoPlistPath("Info.plist");
if (configuration === "Debug")
task.setCompilerFlags("-DDEBUG -g");
else
task.setCompilerFlags("-O");
});
task("build", ["CappuccinoResource"]);
task("debug", function()
{
ENV["CONFIG"] = "Debug"
JAKE.subjake(["."], "build", ENV);
});
task("release", function()
{
ENV["CONFIG"] = "Release"
JAKE.subjake(["."], "build", ENV);
});
task ("test", function()
{
var tests = new FileList('Tests/*Test.j');
var cmd = ["ojtest"].concat(tests.items());
var cmdString = cmd.map(OS.enquote).join(" ");
var code = OS.system(cmdString);
if (code !== 0)
OS.exit(code);
});