build: reduce build log noise

This commit is contained in:
Peter Steinberger
2026-03-08 04:12:32 +00:00
parent a035a3ce48
commit dd8fd98ad4
5 changed files with 95 additions and 49 deletions

View File

@@ -9,6 +9,7 @@ import { fileURLToPath } from "node:url";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const projectRoot = path.resolve(__dirname, "..");
const verbose = process.env.OPENCLAW_BUILD_VERBOSE === "1";
const srcBundled = path.join(projectRoot, "src", "hooks", "bundled");
const distBundled = path.join(projectRoot, "dist", "bundled");
@@ -24,6 +25,7 @@ function copyHookMetadata() {
}
const entries = fs.readdirSync(srcBundled, { withFileTypes: true });
let copiedCount = 0;
for (const entry of entries) {
if (!entry.isDirectory()) {
@@ -46,10 +48,13 @@ function copyHookMetadata() {
}
fs.copyFileSync(srcHookMd, distHookMd);
console.log(`[copy-hook-metadata] Copied ${hookName}/HOOK.md`);
copiedCount += 1;
if (verbose) {
console.log(`[copy-hook-metadata] Copied ${hookName}/HOOK.md`);
}
}
console.log("[copy-hook-metadata] Done");
console.log(`[copy-hook-metadata] Copied ${copiedCount} hook metadata files.`);
}
copyHookMetadata();