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

[dart pub bump] add a changelog parameters to add an entry to the changelog #4461

Open
cedvdb opened this issue Dec 8, 2024 · 5 comments
Open

Comments

@cedvdb
Copy link

cedvdb commented Dec 8, 2024

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"
@cedvdb cedvdb closed this as completed Dec 9, 2024
@sigurdm sigurdm reopened this Dec 9, 2024
@sigurdm
Copy link
Contributor

sigurdm commented Dec 9, 2024

Yeah - I think this is a good idea. I just think we need to settle on a specific changelog format first...

@cedvdb
Copy link
Author

cedvdb commented Dec 9, 2024

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)

@sigurdm
Copy link
Contributor

sigurdm commented Dec 9, 2024

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?

@sigurdm
Copy link
Contributor

sigurdm commented Dec 9, 2024

(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

@cedvdb
Copy link
Author

cedvdb commented Dec 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants