Skip to content

Commit

Permalink
fix: remove dependency for release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSchafer committed May 10, 2024
1 parent 36e2460 commit 2b1a259
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ $(BINARY_OUTPUT_FOLDER)/release.json:
# We're using this to remove CLIv2 changes in v1's changelogs.
# :(exclude) syntax: https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-exclude
# Release notes uses version from package.json so we need to prepack beforehand.
$(BINARY_OUTPUT_FOLDER)/RELEASE_NOTES.md: prepack | $(BINARY_RELEASES_FOLDER_TS_CLI)
$(BINARY_OUTPUT_FOLDER)/RELEASE_NOTES.md:
npx conventional-changelog-cli -l -r 1 -n ./release-scripts/conventional-changelog-cli-config.js > $(BINARY_OUTPUT_FOLDER)/RELEASE_NOTES.md

$(BINARY_OUTPUT_FOLDER)/fips/RELEASE_NOTES.md: $(BINARY_OUTPUT_FOLDER)/RELEASE_NOTES.md $(BINARY_OUTPUT_FOLDER)/fips
Expand Down
6 changes: 4 additions & 2 deletions release-scripts/prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ if [ -f binary-releases/RELEASE_NOTES.md ]; then
fi

# Generate the release notes baseline from the commits
make binary-releases/RELEASE_NOTES.md clean-package-files format
make binary-releases/RELEASE_NOTES.md format

# if the release notes are generated locally, the version contains something like X.Y.Z-dev.hash
# the replacement below ensures that the version in the RELEASE_NOTES.md is X.Y.Z
sed -i "version" -e "s/$(cat binary-releases/version)/$(npx semver --coerce $(cat binary-releases/version))/g" binary-releases/RELEASE_NOTES.md
VERSION_TO_REPLACE=$(npm pkg get version | tr -d '"')
VERSION_TO_REPLACE_WITH=$(npx semver --coerce $(cat binary-releases/version))
sed -i "version" -e "s/$VERSION_TO_REPLACE/$VERSION_TO_REPLACE_WITH/g" binary-releases/RELEASE_NOTES.md

# Commit and push the release notes
git add -f binary-releases/RELEASE_NOTES.md
Expand Down

0 comments on commit 2b1a259

Please sign in to comment.