Skip to content

Commit

Permalink
chore: fix CHANGELOG generation for v2 branch (#13019)
Browse files Browse the repository at this point in the history
The CHANGELOG for the v2 releases has been inaccurate, only showing a fraction
of the changes and mixing v1 and v2 releases side by side.

The issue appears to be how `conventional-changelog` handles interleaving
changes across major versions on separate branches. After digging into the
internals of conventional-changelog and standard-release a bit, I don't see a
supported way to achieve our desired outcome.

However, I did come up with a hack that results in the right end result. By
(locally) removing all v1.* tags, and running the release, a correct CHANGELOG
is created. Likewise, on the master/v1 branch, removing v2.* tags prior to
bumping does not appear to have any adverse effects.

I would be thrilled for someone to point out the option(s) that I missed to do
this more elegantly, but for now this seems to work.

I also took the liberty of re-generating the v2 CHANGELOG for the previous
releases using this fix, to show what the correct output should look like.

I will backport the changes to bump.js to master once this has been shipped.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
njlynch authored Feb 15, 2021
1 parent 79648b5 commit 5ae60bd
Show file tree
Hide file tree
Showing 2 changed files with 159 additions and 43 deletions.
Loading

0 comments on commit 5ae60bd

Please sign in to comment.