-
Notifications
You must be signed in to change notification settings - Fork 124
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
How to best handle multiple version branches? #318
Comments
It sounds like it 'just works' as is? Unreleased changes show up in branches they are present in. But you are interested in having 'unreleases' listed in the changelog? Though I will say that I personally would like to be able to have the newsfragments stick around forever. In my case I see that as part of getting rid of the mandatory commits to do a release. Though, I don't expect to get anything done on that in the near future. I guess if you make a wrapper/helper, or just manually do the steps, you could have separate directories and run for each in whatever sequence you want to build the docs. Maybe duplicate the configs per branch to handle the variations including specifying unrelease versions? I can see how some sort of feature(s) could be pulled out of this but I will say that it seems unlikely to happen inside towncrier in the near future. Thanks for sharing the use case for consideration. |
One way to keep fragments around permanently could be a setting like this: directory = 'changes'
directory_per_version = true
keep_fragments = true
# and/or `recreate = true` to indicate the news file should be overwritten instead of prepended? Enabling that would then not get the version from the config/package but rather from subdirectories inside |
Over at https://github.com/pantsbuild/pants we'd love to improve our CHANGELOG generation and Unfortunately, we're in the same boat as OP. There's workarounds, for sure, but who wants those? 😄 |
I might be confused, but it sounds like you're emphatically not in the same boat at OP? OP's problem as I understand it is that they merge into both direction (i.e. What you're describing is cherry-picking from Or what am I missing here? |
Ah yeah I think you're right on OP. I misread |
My project uses
master
for active development, and a2.3-maintenance
for the current stable release. When we fix bugs or make other improvements to the stable version, we commit them to that branch, and then merge it into master.Right now with a manually managed changelog that works pretty well - in
master
there's a changelog for the version in master at the beginning, and the older changelog gets updated during the git merge.However, due to the way towncrier works, merging maintenance into master would put the maintenance changelog fragments that haven't been released yet into the changelog of the master version.
One workaround I see would be setting
directory = 'changes/v2.3'
in maintenance anddirectory = 'changes/v3.0'
in master to keep the fragments completely separate. But when building the "latest" docs from masters, they'd not have any changelog for the unreleased maintenance version.Alternatively I could keep the shared folder and accept that the master changelog will include maintenance fixes until a release is made from the maintenance branch (which would delete those fragments). This could actually be an advantage because once I forgot to move some changes from a maintenance branch (which were never released since we did a major release anyway and those changes were not important enough to make a new maintenance release) to the master changelog.
Initially I thought towncrier could build the whole changelog from multiple directories with fragments (ie keeping fragments forever and always using them as the source of truth for the full changelog file), but of course that's not the case...
So if anyone has suggestions on how to best handle this project structure with towncrier I'd appreciate it.
The text was updated successfully, but these errors were encountered: