Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | #!/usr/bin/env node
import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { Command } from 'commander';
import { bumpBazelPinCommand } from './commands/bump-bazel-pin.js';
import { auditV1GitcoreDriftCommand } from './commands/audit-v1-gitcore-drift.js';
import { publishV1GitcoreCssCommand } from './commands/publish-v1-gitcore-css.js';
import { runCommand } from './run-command.js';
import { releaseNotesCommand, type ReleaseNotesCommandOptions } from './commands/release-notes.js';
const packageJsonPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
const { version } = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')) as { version: string };
const program = new Command();
program.enablePositionalOptions();
program.name('sds-release-manager').description('CLI for SDS release playbooks').version(version);
program
.command('release-notes')
.description('Author the exact SLDSv1 release section and run the existing CJS compiler')
.requiredOption('--version <version>', 'Full SLDS package version (base used for heading)')
.requiredOption('--date <label>', 'Date or label for a new section; existing labels are preserved')
.option('--repo-root <path>', 'Repository root (defaults to this module’s repository)')
.option('--dry-run', 'plan real general notes; skip writes and compilation', false)
.action(async (opts: ReleaseNotesCommandOptions) => {
await runCommand(() => releaseNotesCommand(opts));
});
program
.command('bump-bazel-pin')
.description('Bump slds-scs Bazel pin on gitcore via GitHub APIs')
.requiredOption('--pr <url-or-number>', 'aura/slds-scs PR URL or number')
.option('--dry-run', 'run live reads; skip branch create, commit, and PR create', false)
.action(async (opts: { pr: string; dryRun?: boolean }) => {
await runCommand(() => bumpBazelPinCommand(opts));
});
program
.command('audit-v1-gitcore-drift')
.description('Read-only: audit generated V1 Core CSS for drift against the vended gitcore artifacts')
.requiredOption('--release <number>', 'Core release number')
.requiredOption('--target <branch>', 'Target branch p4/<release>-main or p4/<release>-patch')
.action(async (opts: { release: string; target: string }) => {
await runCommand(() => auditV1GitcoreDriftCommand(opts));
});
program
.command('publish-v1-gitcore-css')
.description('Publish the audited V1 Core CSS evidence packet to a gitcore release branch + PR (writes).')
.option('--result <path>', 'Path to the audit result.json evidence packet')
.option('--report <dir>', 'Audit report directory containing result.json')
.requiredOption('--wi <W-xxxxxxxx>', 'GUS work item')
.option('--dry-run', 'run live reads including LFS query; skip all writes', false)
.option('--publish-version-only', 'publish a version-only re-stamp', false)
.action(
async (opts: {
result?: string;
report?: string;
wi: string;
dryRun?: boolean;
publishVersionOnly?: boolean;
}) => {
await runCommand(() => publishV1GitcoreCssCommand(opts));
},
);
await program.parseAsync(process.argv);
|