-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: include merged tags when determining the previous release #1440
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
I'm closing this because this would change the |
The automatic next-release workflow just ran and released a correctly versioned -next release ✅ |
Towards #1442
Problem
The
next-release
workflow in CircleCI releases a-next
package in NPM. It determines the version number based on the previous annotated, tagged commit originating from themaster
branch. It doesn't consider tags that were merged from other branches.In #1381 (comment), I force-pushed several annotated tags in an attempt to fix the auto-generated CHANGELOG.md files. Before this, there were zero annotated, tagged commits originating from the
master
branch so thenext-release
workflow would fallback to counting commits from the beginning fo time. This is why the-next
releases end with a number instead of a commit hash.The reason there was zero annotated, tagged commits originating from the
master
branch is that we've always used squash merge to merge PRs intomaster
. squash merge changes the commit hash, thus orphaning the tags produced bylerna publish
.Proposed Solution
--include-merged-commits
option in thenext-release
workflow. We could adopt the release process in https://github.com/RequestNetwork/release-tools/pull/8 which useslerna publish
on arelease
branch and thenmerges
(notsquash merge
) the tagged commits to master. The-next
releases going forward would haveshortSHA
postfixes instead ofrefCount
postfixes. This requires us to enablemerge
on themaster
branch which I don't love - because it runs the risk that non-conventional commits are merged to themaster
branch.Alternative Solution
master
branch. We could still adopt the new release process in https://github.com/RequestNetwork/release-tools/pull/8 except continue using squash merge for therelease
branch. The-next
releases going forward would still have therefCount
postfixes, and we wouldn't have to enablemerge
on themaster
branch. I don't love this option either because it eliminates the possibility of bumping the version on only changed packages instead of force-publishing all packages every time.