Skip to content

Commit

Permalink
chore: Fix line spacing when generating changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Aug 15, 2021
1 parent 31da469 commit 2497dc3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions scripts/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,11 @@ const formatChanges = (changes) =>
const features = formatChanges(changes.filter((line) => isFeature(line)));
const others = formatChanges(changes.filter((line) => !isFeature(line)));

const heading = (IS_MAJOR ? '## ' : '### ') + CURRENT_TAG + EOL;
const sections = [heading];
if (features.length > 0) sections.push('#### Features' + P + features + EOL);
if (others.length > 0) sections.push('#### Bugfixes' + P + others + EOL);
shell.ShellString(sections.join(EOL)).toEnd(FILE);
shell.echo(shell.cat(FILE));
let NOTES = (IS_MAJOR ? '## ' : '### ') + CURRENT_TAG + P;
if (features.length > 0) NOTES += '#### Features' + P + features + P;
if (others.length > 0) NOTES += '#### Bugfixes' + P + others + P;
shell.ShellString(NOTES).toEnd(FILE);
shell.echo(NOTES);

shell.cat('docs/documentation/CHANGELOG.md').toEnd(FILE);
shell.cp(FILE, 'docs/documentation/CHANGELOG.md');

0 comments on commit 2497dc3

Please sign in to comment.