diff --git a/scripts/release.mjs b/scripts/release.mjs index 7d4029d07..5c5828f2f 100755 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -26,6 +26,8 @@ const COMPONENTS = { buildCmd: 'bun run build', artifacts: ['dist/universal.zip'], postReleaseHint: null, + tweetHeader: (v) => `Impeccable v${v} is out.`, + tweetCta: 'Install / update: npx skills add pbakaus/impeccable', }, cli: { manifest: 'package.json', @@ -35,6 +37,8 @@ const COMPONENTS = { buildCmd: null, artifacts: [], postReleaseHint: 'Run `npm publish` next to push the package to the npm registry.', + tweetHeader: (v) => `Impeccable CLI v${v} is out.`, + tweetCta: 'npm i -g impeccable', }, extension: { manifest: 'extension/manifest.json', @@ -44,9 +48,14 @@ const COMPONENTS = { buildCmd: 'bun run build:extension', artifacts: ['dist/extension.zip'], postReleaseHint: 'Upload `dist/extension.zip` to the Chrome Web Store dashboard to publish.', + tweetHeader: (v) => `Impeccable Chrome extension v${v} is out.`, + tweetCta: null, }, }; +const REPO_URL = 'https://github.com/pbakaus/impeccable'; +const TWEET_LIMIT = 280; + const args = process.argv.slice(2); const dryRun = args.includes('--dry-run'); const component = args.find((a) => !a.startsWith('--')); @@ -196,6 +205,60 @@ if (cfg.postReleaseHint) { console.log(`\n→ Next step: ${cfg.postReleaseHint}`); } +const tweet = renderTweet(cfg, version, entryHtml, tag); +console.log(`\n--- Tweet (${tweet.length}/${TWEET_LIMIT} chars) for @impeccable_ai ---`); +console.log(tweet); +console.log('--- end tweet ---'); + +// Pull the bold lead text from each changelog bullet. Each