Skip to content

Commit

Permalink
fix: changelog correctly link to closed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjackwills committed Apr 30, 2022
1 parent ec14c85 commit 5820d0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions create_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ update_release_body_and_changelog () {
RELEASE_BODY_ADDITION="${DATE_SUBHEADING}$1"
echo -e "${RELEASE_BODY_ADDITION}\n\nsee <a href='${GIT_REPO_URL}/blob/main/CHANGELOG.md'>CHANGELOG.md</a> for more details" > .github/release-body.md
echo -e "# <a href='${GIT_REPO_URL}/releases/tag/${NEW_TAG_VERSION}'>${NEW_TAG_VERSION}</a>\n${DATE_SUBHEADING}${CHANGELOG_ADDITION}$(cat CHANGELOG.md)" > CHANGELOG.md

# Update changelog to add links to commits [hex x40]
sed -i -E "s=(\s)\[([0-9a-f]{40})\](\n|\s|\,|\r)= [\2](${GIT_REPO_URL}/commit/\2),=g" ./CHANGELOG.md

# Update changelog to add links to closed issues
sed -i -r -E "s=closes \[#([0-9]+)\],=[#\1](${GIT_REPO_URL}/issues/\1),=g" ./CHANGELOG.md
}

# update version in cargo.toml, to match selected current version/tag
Expand Down

0 comments on commit 5820d0a

Please sign in to comment.