Skip to content
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

Update: Major version changelogs include all prereleases #37

Merged
merged 2 commits into from
May 8, 2020

Conversation

btmills
Copy link
Member

@btmills btmills commented May 8, 2020

For a new stable release following a prerelease sequence, the changelog will include the commits for all of the prereleases going back to the last stable release. For example, given the following release sequence:

  • 6.7.8
  • 6.8.0
  • 7.0.0-alpha.0
  • 7.0.0-alpha.1
  • 7.0.0

The 7.0.0 changelog will include all changes since 6.8.0, whereas the 7.0.0-alpha.1 changelog will include only changes since 7.0.0-alpha.0.

If we prefer to include all changes going back to the previous stable release even for prerelease changelogs, that's an easy change and actually simplifies the logic a bit.

For a new stable release following a prerelease sequence, the changelog
will include the commits for all of the prereleases going back to the
last stable release. For example, given the following release sequence:

- 6.7.8
- 6.8.0
- 7.0.0-alpha.0
- 7.0.0-alpha.1
- 7.0.0

The `7.0.0` changelog will include all changes since 6.8.0, whereas the
`7.0.0-alpha.1` changelog will include only changes since
`7.0.0-alpha.0`.

If we prefer to include all changes going back to the previous stable
release even for prerelease changelogs, that's an easy change and
actually simplifies the logic a bit.
@btmills btmills requested a review from kaicataldo May 8, 2020 00:57
@@ -252,6 +284,36 @@ describe("ReleaseOps", () => {
});
});

it("should create the next stable release following a prerelease", () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, assuming our last prerelease before a stable major release was a release candidate, the stable release's changelog would've only included changes since the release candidate. At that phase of the release, breaking changes are discouraged. Now that we're including breaking changes in the stable release's changelog, I added this test to verify that the version bump won't mistakenly go from 7.0.0-rc.0 to 8.0.0 when it sees a Breaking: commit in the changelog for a release following a release candidate.

@btmills btmills added enhancement and removed triage labels May 8, 2020
Copy link
Member

@kaicataldo kaicataldo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@kaicataldo kaicataldo merged commit 3d05dc5 into master May 8, 2020
@kaicataldo kaicataldo deleted the changelog-since-stable-conditional branch May 8, 2020 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants