mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-04 08:06: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.
110 lines
4.0 KiB
JavaScript
110 lines
4.0 KiB
JavaScript
/*
|
|
* Jakefile
|
|
* Tests/Manual
|
|
*
|
|
* Created by David Richardson, September 8, 2026
|
|
* Copyright 2026, David Richardson. All rights reserved.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
var ENV = process.env,
|
|
task = JAKE.task,
|
|
cp = require("child_process"),
|
|
path = require("path");
|
|
|
|
/*
|
|
* Standard build targets are neutered at this directory level to prevent automated
|
|
* CI runners from triggering exhaustive, recursive compilations across all manual test suites.
|
|
*/
|
|
task ("default", function()
|
|
{
|
|
console.log("Global traversal disabled to prevent CI timeouts.");
|
|
console.log("Use 'npx jake batch-compile' or 'npx jake batch-compile-all' to deliberately build the suite.");
|
|
});
|
|
|
|
task ("build", ["default"]);
|
|
task ("build-all", ["default"]);
|
|
task ("debug", ["default"]);
|
|
task ("release", ["default"]);
|
|
|
|
/*
|
|
* -----------------------------------------------------------------------------
|
|
* Environment Management
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
* Traverses every manual test subdirectory containing a Jakefile and symlinks its
|
|
* internal 'Frameworks' directory directly to the concrete Build/Frameworks
|
|
* directory generated at the project root.
|
|
*/
|
|
task ("configure", function()
|
|
{
|
|
var manualDir = __dirname;
|
|
var targetPath = path.resolve(manualDir, "../../Build/Frameworks");
|
|
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir sh -c 'echo \"Configuring $(basename \\\"$PWD\\\")\"; ln -sfn \"$1\" Frameworks' _ '" + targetPath + "' \\;", { stdio: "inherit", cwd: manualDir });
|
|
});
|
|
|
|
/*
|
|
* Cleans the subsidiary applications' Build directories exclusively (-mindepth 2 -maxdepth 2).
|
|
*/
|
|
task ("clean", function()
|
|
{
|
|
var manualDir = __dirname;
|
|
var targetName = path.basename(ENV["BUILD_PATH"] || ENV["CAPP_BUILD"] || "Build");
|
|
cp.execSync("find . -mindepth 2 -maxdepth 2 -type d -name '" + targetName + "' -exec rm -rf {} +", { stdio: "inherit", cwd: manualDir });
|
|
});
|
|
|
|
/*
|
|
* Sweeps Frameworks symlinks across subsidiary test applications after delegating Build directory removal to clean.
|
|
*/
|
|
task ("clobber", ["clean"], function()
|
|
{
|
|
var manualDir = __dirname;
|
|
cp.execSync("find . -mindepth 2 -maxdepth 2 -type l -name 'Frameworks' -exec rm -f {} +", { stdio: "inherit", cwd: manualDir });
|
|
});
|
|
|
|
/*
|
|
* -----------------------------------------------------------------------------
|
|
* Manual Execution Targets
|
|
* -----------------------------------------------------------------------------
|
|
*/
|
|
|
|
/*
|
|
* Triggers baseline compilation across all subproject manual tests for local testing.
|
|
*/
|
|
task ("batch-compile", function()
|
|
{
|
|
var manualDir = __dirname;
|
|
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir npx jake build \\;", { stdio: "inherit", env: ENV, cwd: manualDir });
|
|
});
|
|
|
|
task ("batch-compile-all", ["batch-compile-debug", "batch-compile-release"]);
|
|
|
|
task ("batch-compile-debug", function()
|
|
{
|
|
var manualDir = __dirname;
|
|
ENV["CONFIGURATION"] = "Debug";
|
|
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir npx jake debug \\;", { stdio: "inherit", env: ENV, cwd: manualDir });
|
|
});
|
|
|
|
task ("batch-compile-release", function()
|
|
{
|
|
var manualDir = __dirname;
|
|
ENV["CONFIGURATION"] = "Release";
|
|
cp.execSync("find . -mindepth 2 -iname 'jakefile' -execdir npx jake release \\;", { stdio: "inherit", env: ENV, cwd: manualDir });
|
|
});
|