Skip to content

Commit

Permalink
add gh release create note
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Jul 22, 2024
1 parent 7ed9d06 commit 66fdab5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/promote_release.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ export default class ReleasePromotion extends Session {
' 3. Create the release on GitHub.\n' +
' 4. Optionally, announce the release on your social networks.\n' +
' 5. Tag @nodejs-social-team on #nodejs-release Slack channel.\n');

cli.separator();
cli.info('Use the following command to create the release:');
cli.separator();
cli.info(
'awk \'' +
`/^## ${this.date.replaceAll('.', '\\.')}, Version ${this.version.replaceAll('.', '\\.')}/,` +
'/^<a id="[0-9]+\\.[0-9]+\\.[0-9]+"><\\x2fa>$/{' +
'print buf; if(firstLine == "") firstLine = $0; else buf = $0' +
`}' doc/changelogs/CHANGELOG_V${
this.versionComponents.major}.md | gh release create ${this.version} --verify-tag --latest=${
!this.isLTS} --title=${JSON.stringify(this.releaseTitle)} --notes-file -`);
}

async verifyPRAttributes() {
Expand Down Expand Up @@ -320,6 +332,7 @@ export default class ReleasePromotion extends Session {
cli.error('Cannot find section for the new release in CHANGELOG');
throw new Error('Aborted');
}
this.releaseTitle = headingLine[0].slice(4);
const expectedLine = `+## ${releaseCommitMessage}, @${this.username}`;
if (headingLine[0] !== expectedLine &&
!headingLine[0].startsWith(`${expectedLine} prepared by @`)) {
Expand Down

0 comments on commit 66fdab5

Please sign in to comment.