feat(release): automate versioned releases on main

This commit is contained in:
2026-09-17 18:41:53 +02:00
parent dd37622bb6
commit 92859f3ccf
39 changed files with 7365 additions and 243 deletions

21
scripts/release/cli.mjs Normal file
View File

@@ -0,0 +1,21 @@
import { assertBootstrap, checkCommits, commitsSince, createPlan, readConfig } from './lib.mjs';
try {
const command = process.argv[2];
if (command === 'check') {
const config = readConfig();
assertBootstrap(config, 'HEAD', process.cwd());
const commits = commitsSince(config.bootstrapCommit);
checkCommits(commits);
console.log(`${commits.length} Commit-Nachrichten geprüft.`);
} else if (command === 'preview') {
const plan = await createPlan();
console.log(JSON.stringify(plan, null, 2));
console.log('\nLokale Vorschau; berücksichtigt die lokal vorhandenen Tags. Zum Aktualisieren: git fetch origin --tags.');
} else {
throw new Error('Aufruf: node scripts/release/cli.mjs check|preview');
}
} catch (error) {
console.error(error.message);
process.exitCode = 1;
}