Add one-command dev-to-prod release with clear SUCCESS/FAILED banners.
Introduce devtoprod:release orchestrator, config file, CLI result footers on deploy scripts, auto-thumb regeneration on curator fixes, and updated deploy documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
313666a4ab
commit
21e3e41e48
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* Run painting + portrait thumbnail regeneration and print one combined result.
|
||||
*/
|
||||
const { spawnSync } = require('child_process');
|
||||
const path = require('path');
|
||||
const { printCliResult } = require('./lib/cli-result');
|
||||
|
||||
const rootDir = path.join(__dirname, '..');
|
||||
const scripts = [
|
||||
{ name: 'regenerate-thumbnails', file: 'regenerate-thumbnails.js' },
|
||||
{ name: 'regenerate-portrait-thumbs', file: 'regenerate-portrait-thumbs.js' },
|
||||
];
|
||||
|
||||
function runScript(script) {
|
||||
const result = spawnSync(process.execPath, [path.join(__dirname, script.file)], {
|
||||
cwd: rootDir,
|
||||
stdio: 'inherit',
|
||||
env: process.env,
|
||||
});
|
||||
return result.status ?? 1;
|
||||
}
|
||||
|
||||
let failed = null;
|
||||
for (const script of scripts) {
|
||||
const code = runScript(script);
|
||||
if (code !== 0) {
|
||||
failed = script.name;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (failed) {
|
||||
printCliResult({
|
||||
script: 'devtoprod-thumbnails',
|
||||
ok: false,
|
||||
summary: `Thumbnail regeneration failed at ${failed}.`,
|
||||
});
|
||||
}
|
||||
|
||||
printCliResult({
|
||||
script: 'devtoprod-thumbnails',
|
||||
ok: true,
|
||||
summary: 'Painting and portrait thumbnail regeneration complete.',
|
||||
details: ['Both regenerate-thumbnails and regenerate-portrait-thumbs succeeded.'],
|
||||
});
|
||||
Reference in New Issue
Block a user