mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-03 23:56:16 +00:00
- Update clean and clobber targets in Tests/Manual/Jakefile to enforce -mindepth 2 -maxdepth 2 traversal. This accurately purges subsidiary Build directories and Frameworks symlinks without triggering subjake dependency cycles. - Inject explicit clean and clobber overrides into all 150+ subsidiary application Jakefiles. This forces local execution to wipe the top-level Build directory, bypassing applicationtask's default behavior of only targeting configuration-specific intermediate paths. - Harmonizes artifact sweeping across both root-level orchestration and local leaf-level execution.
104 lines
3.4 KiB
JavaScript
104 lines
3.4 KiB
JavaScript
/*
|
|
* Jakefile
|
|
* AttachedSheet2Test
|
|
*
|
|
* Created by Saikat Chakrabarti on March 16, 2010.
|
|
* Copyright 2010, gomockingbird.com All rights reserved.
|
|
*/
|
|
|
|
var ENV = process.env,
|
|
cp = require("child_process"),
|
|
fs = require("fs"),
|
|
path = require("path"),
|
|
task = JAKE.task,
|
|
FileList = JAKE.FileList,
|
|
app = CAPPUCCINO.Jake.applicationtask.app,
|
|
configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug";
|
|
|
|
app ("AttachedSheet2Test", function(task)
|
|
{
|
|
task.setBuildIntermediatesPath(path.join("Build", "AttachedSheet2Test.build", configuration));
|
|
task.setBuildPath(path.join("Build", configuration));
|
|
|
|
task.setProductName("AttachedSheet2Test");
|
|
task.setIdentifier("com.gomockingbird.AttachedSheet2Test");
|
|
task.setVersion("1.0");
|
|
task.setAuthor("Saikat Chakrabarti and Sheena Pakanati");
|
|
task.setEmail("contact @nospam@ gomockingbird.com");
|
|
task.setSummary("AttachedSheet2Test");
|
|
task.setSources((new FileList("**/*.j")).exclude(path.join("Build", "**")));
|
|
task.setResources(new FileList("Resources/*"));
|
|
task.setIndexFilePath("index.html");
|
|
task.setInfoPlistPath("Info.plist");
|
|
|
|
if (configuration === "Debug")
|
|
task.setCompilerFlags("-DDEBUG -g");
|
|
else
|
|
task.setCompilerFlags("-O");
|
|
});
|
|
|
|
function printResults(configuration)
|
|
{
|
|
console.log("----------------------------")
|
|
console.log(configuration+" app built at path: "+path.join("Build", configuration, "AttachedSheet2Test"));
|
|
console.log("----------------------------")
|
|
}
|
|
|
|
task ("default", ["AttachedSheet2Test"], function()
|
|
{
|
|
printResults(configuration);
|
|
});
|
|
|
|
task ("build", ["default"]);
|
|
|
|
task ("debug", function()
|
|
{
|
|
ENV["CONFIGURATION"] = "Debug";
|
|
JAKE.subjake(["."], "build", ENV);
|
|
});
|
|
|
|
task ("release", function()
|
|
{
|
|
ENV["CONFIGURATION"] = "Release";
|
|
JAKE.subjake(["."], "build", ENV);
|
|
});
|
|
|
|
task ("run", ["debug"], function()
|
|
{
|
|
cp.execSync(["open", path.join("Build", "Debug", "AttachedSheet2Test", "index.html")].join(" "), { stdio: "inherit" });
|
|
});
|
|
|
|
task ("run-release", ["release"], function()
|
|
{
|
|
cp.execSync(["open", path.join("Build", "Release", "AttachedSheet2Test", "index.html")].join(" "), { stdio: "inherit" });
|
|
});
|
|
|
|
task ("deploy", ["release"], function()
|
|
{
|
|
fs.mkdirSync(path.join("Build", "Deployment", "AttachedSheet2Test"), { recursive: true });
|
|
cp.execSync(["press", "-f", path.join("Build", "Release", "AttachedSheet2Test"), path.join("Build", "Deployment", "AttachedSheet2Test")].join(" "), { stdio: "inherit" });
|
|
printResults("Deployment")
|
|
});
|
|
|
|
task ("press", ["release"], function()
|
|
{
|
|
fs.mkdirSync(path.join("Build", "Press", "AttachedSheet2Test"), { recursive: true });
|
|
cp.execSync(["press", "-f", path.join("Build", "Release", "AttachedSheet2Test"), path.join("Build", "Press", "AttachedSheet2Test")].join(" "), { stdio: "inherit" });
|
|
});
|
|
|
|
task ("flatten", ["press"], function()
|
|
{
|
|
fs.mkdirSync(path.join("Build", "Flatten", "AttachedSheet2Test"), { recursive: true });
|
|
cp.execSync(["flatten", "-f", "--verbose", "--split", "3", "-c", "closure-compiler", path.join("Build", "Press", "AttachedSheet2Test"), path.join("Build", "Flatten", "AttachedSheet2Test")].join(" "), { stdio: "inherit" });
|
|
});
|
|
|
|
task ("clean", function()
|
|
{
|
|
cp.execSync("rm -rf Build", { stdio: "inherit" });
|
|
});
|
|
|
|
task ("clobber", ["clean"], function()
|
|
{
|
|
cp.execSync("rm -rf Frameworks", { stdio: "inherit" });
|
|
});
|