Skip to content

Commit

Permalink
Improve release script
Browse files Browse the repository at this point in the history
  • Loading branch information
alichtman committed Feb 10, 2025
1 parent 275788e commit 93484c9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions scripts/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,18 @@ async function release(): Promise<void> {
const command = `gh release create ${CURRENT_VERSION} --title "${prettyVersion}" --target main --generate-notes ${
isAutodetectedPrerelease || isPrerelease ? '--prerelease' : ''
}`;
console.log(chalk.green.bold(`Executing command: $ ${command}`));
execSync(command, { stdio: 'inherit' });

console.log(chalk.green.bold(`\nExecuting command: $ ${command}\n`));
const output = execSync(command, { stdio: 'pipe' }).toString();
console.log(chalk.blue(output));

console.log(
chalk.green.bold(
'A release has been created. You will need to publish it from the GitHub UI. CI will populate the build artifacts. Make sure to update the Homebrew recipe (https://github.com/Homebrew/homebrew-cask/blob/master/Casks/d/deadbolt.rb), and any other package managers with the new release.\n',
),
chalk.green.bold(`
\nA ${chalk.yellow.bold('DRAFT')} release has been created.
You will need to publish it from the GitHub UI.
CI will populate the build artifacts. The Homebrew recipe (https://github.com/Homebrew/homebrew-cask/blob/master/Casks/d/deadbolt.rb) should be automatically updated once you publish the release.
Make sure you update any other package managers with the new release.
`),
);
resolve();
} catch (error) {
Expand All @@ -193,7 +199,7 @@ async function release(): Promise<void> {
// Run the release process
release()
.then(() => {
console.log(chalk.green.bold('Release completed successfully!'));
console.log(chalk.green.bold('Draft release completed successfully!'));
process.exit(0);
})
.catch((err) => {
Expand Down

0 comments on commit 93484c9

Please sign in to comment.