Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ At a high-level, the process for releasing a new version of a package is:
1. Run `npm run release:prep-changelog`. You should now be on a branch named
`changelog-v${NEW_VERSION}` containing the automatically generated changelog
additions.
* If you receive the message "There were no changelog entries generated" and this is
expected, please proceed to [Perform the Version Bump](#perform-the-version-bump).
* If the changelog needs to be edited, please make the needed adjustments and amend
your edits to the "chore: update changelog" commit.
* When preparing the changelog for a final version, the release candidate changelog
Expand Down
11 changes: 4 additions & 7 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,10 @@ function createChangelogAdditions(opts) {

changelogStream.on('end', () => {
// In the event the there are no entries added to the changelog (i.e. it's just a
// changelog header), we don't want to add anything to the changelog
// changelog header), we add a line acknowledging this release only contains
// documentation or internal changes.
if (content.trim().split('\n').length === 1) {
resolve(undefined);
content += '_This release only contains documentation or internal changes._\n\n';
}

resolve(content);
Expand Down Expand Up @@ -228,11 +229,7 @@ const main = async (argv) => {
});

if (!changelogAdditions) {
console.warn(chalk.yellow(
'There were no changelog entries generated. Aborting changelog preparation.'
+ ' If this is expected (e.g. only documentation or internal changes were made),'
+ ' this version can be finalized without an update to the changelog.'
));
console.warn(chalk.yellow('There were no changelog entries generated. Aborting changelog preparation.'));
return;
}

Expand Down