#!/usr/bin/env node import path from 'node:path'; import { spawnSync } from 'node:child_process'; import { fileURLToPath } from 'node:url'; const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); function run(script, args) { const result = spawnSync(process.execPath, [path.join(repoRoot, 'scripts', script), ...args], { cwd: repoRoot, stdio: 'inherit', windowsHide: true, }); if (result.error) { console.error(`[FAIL] Could not run ${script}: ${result.error.message}`); process.exit(1); } if (result.status !== 0) process.exit(result.status ?? 1); } run('stage-engines.js', []); run('verify-binaries.js', ['--staged']);