[dart pub bump] add a changelog parameters to add an entry to the changelog
Opened this issue · 5 comments
It may seem out of scope but for quality of life, a parameter to add a changelog entry would be helpful when running in CI
eg:
dart pub bump patch --changelog-entry="Update metadata"
Yeah - I think this is a good idea. I just think we need to settle on a specific changelog format first...
I propose the format:
# 1.0.0 - 2024-12-09
- changelog entry
- other entry
dart pub bump patch --changelog-entry="changelog entry" --changelog-entry="other entry"
(not sure if multiple arguments like that is supported, that's what a quick google search gave me)
Problem is that many existing changelogs will have another format.
- With or without a date,
- version prefixed with 'v' or not,
- first or second level heading
- ...
Should we try to detect the existing format?
(not sure if multiple arguments like that is supported, that's what a quick google search gave me)
I think package:args can handle this. But it feels like this would be less ergonomic than just inserting a placeholder in CHANGELOG.md itself.
$ dart pub bump major --changelog
$ cat CHANGELOG.md
## 2.0.0
- <TODO> describe v2.0.0
Should we try to detect the existing format?
Detecting the existing format sounds like an error vector for little gains to me (but maybe it's easier than I think ? ). The simplest solution, imo, would be to have a recommended format, so no detection is required.
If people want their specific format they can always do it manually
just inserting a placeholder in CHANGELOG.md itself.
If I understood you correctly, that would defeat the purpose of the parameter quite a bit, which is, at least in my case, to not have to modify that file via the command line (or manually), because that command is run in github actions.
To give some context: I have a package that downloads phone numbers metadata periodically and generates dart classes via github actions. My goal with a changelog parameter would be to just run dart pub bump patch --(some changelog arg)
and then auto publish it. This seems like a nice, simple workflow that people would generally use.