Skip to content

Commit

Permalink
fix release headings
Browse files Browse the repository at this point in the history
ecraig12345 committed May 1, 2023
1 parent 899b8e1 commit 199f6d0
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion scripts/release/bumpAndRelease.js
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@ export async function amendChangelog(prevVersion, newVersion) {
for (const section of sections) {
if (getHeadingText(section, headingLevel) === newVersion) {
changelogEntry = section;
break;
}
}

@@ -159,7 +160,7 @@ export async function bumpAndRelease(github, githubToken) {
name: tagName,
tag_name: tagName,
// Remove the header (the release page shows a redundant header)
body: changelogEntry.replace(getHeadingText(changelogEntry, headingLevel), ''),
body: changelogEntry.replace(/^#+.*?\n+/, ''),
prerelease: tagName.includes('-'),
...defaultRepoDetails,
});
1 change: 1 addition & 0 deletions scripts/updateReadme.js
Original file line number Diff line number Diff line change
@@ -209,6 +209,7 @@ ${comments.extra.end}
"Readme is out of date (see above for diff). Please run 'yarn update-readme' and commit the changes."
);
} else {
fs.writeFileSync(readmeFile, newReadme);
console.log('\nUpdated readme!\n');
}
}
2 changes: 1 addition & 1 deletion scripts/utils/markdown.js
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ export function splitByHeading(text, level) {
}

/**
* Get the text of the first heading of the given level
* Get the text of the first heading of the given level (excluding the `#`s)
* @param {string} text
* @param {number} level
* @returns {string}

0 comments on commit 199f6d0

Please sign in to comment.