-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Single CHANGELOG.md for the whole project #841
Comments
How would the resulting changelog look like? Does it include commits for both the projects? Or does it distinguish the commits between the two projects? Is this what you want? |
Yes this seems about right. I'm thinking about mixing commits from both crates. |
For this you would need to configure git-cliff accordingly. I'm not sure it's possible. Let me know. |
For what it's worth, I would like to see the former. My project https://github.com/XAMPPRocky/rasn has one main crate, and a bunch of sub-crates that use the main crate to implement a standard. It would be great if it could any changes that affected a sub-crate as a separate heading in the CHANGELOG. Eg. # 0.7.0
- Update Dependencies (#100) # Changes both `rasn` and `rasn-pkix`
- Fixed codec bug (#150) # Changes `rasn`
## rasn-pkix
- Update Dependencies (#100)
- Fixed CRL field tag (#200) # Changes `rasn-pkix`
|
This is not supported by git-cliff, the library we use to generate the changelog. |
when generating it for the first time, it's easy and your approach works. |
Have you considered allowing users to specify a template for a release? That would mean you don't need to parse it and instead you could expose the abstract JSON to a template engine like Tera, and let the users generate the markdown, and then you just need parse enough to push it to the top of the CHANGELOG. |
Ah I guess, but what I'm more saying is to move the formatting generation inside release-plz, and then in tera you just provide the different projects as an array or map. Also in that documentation, it doesn't actually specify what context object's schema is (or show the default template as an example), so it's hard to know what fields are available. |
Does this require that release-plz scans the whole git history or similar?
100% agree. At the moment I link to the git-cliff config, but the git-cliff docs are huge. Most of the git-cliff docs are not relevant for release-plz. It would be nice to hide git-cliff to the user, managing the changelog configuration in |
I'm not entirely sure what you mean, what about providing the different projects in an array/map would require git history? I assumed that the changelog format would be for a new changelog entry, so the array/map would only contain projects who have new changes to be added to the changelog. |
Oh, I see! Maybe you want:
I thought you wanted:
|
version 1 only changes the top of the changelog, so it's feasible 👍 |
@MarcoIeni Yes exactly, that the new crates/changes are always appended to the changelog regardless of their actual version, because if I were to release a new crate in the same workspace at 0.1.0 I would still want it at the top of the changelog so people can see it, where as if I added a new crate to an existing workspace and it tried to match the position with the version position of older crates, then it would mean that recent changes would be buried under old changes. |
@MarcoIeni My point is that we want to release a single package As you can see, there are only changes in |
would this fix your issue? Can you make an example of the changelog/changelogs you would like release-plz to generate? |
@MarcoIeni That will probably work for borsh-rs, but it sounds like a more complex solution than just collecting all changes for the whole repo into a single CHANGELOG file. Do you have concerns about this approach? (This wouldn't work well for monorepos with several semi-independent crates, but will work great for borsh-rs, serde, tokio like repos) |
Yes, because as you said it doesn't work for everyone. Not sure if the default behavior should be the one you described instead of the current one. Anyway, I think that the |
@MarcoIeni I did not suggest to turn it by default (though, I would say that most often it is the desired behavior, and yet, I would not make this opinionated breaking change now) |
The |
Fixed, thanks! |
@MarcoIeni You are the best! release-plz seems to be working as expected for borsh-rs now! near/borsh-rs#197 |
Motivations
In current shape it is possible to generate/update
CHANGELOG.md
per crate or to specify which crate is "special" and generateCHANGELOG.md
only for it.I would appreciate if there was an option to aggregate the changes to some root level
CHANGELOG.md
.Let's say there is a workspace repo with 2 crates
I don't want separate
CHANGELOG.md
files per crate and using the single-changelog I need to specify for which crate the changes will be considered to fill theCHANGELOG.md
What I want is for
release-plz
to allow me to specify theCHANGELOG.md
in the root or maybe even have it set as default and update it with all the changes in the git project.Solution
It could be done either as:
which would override the default settings and save the git changes to specified file
or maybe to allow specyfing multiple
projects
to use the same CHANGELOG.mdNeither of those work in the current state unfortunately
The text was updated successfully, but these errors were encountered: