Create a release commit with the changelog
I would really like gren to also create a "release" commit containing the changelog.
This is a very good idea for an option.
Would you think it should push it too?
Yes it would be awesome if it did.
I would really like a way to bump versions as well but that is just me.
My dream workflow is:
- My project is ready to release
- I run gren to:
- automatically bump the version (major or minor or patch) (read/write it from a package.json or a version file or from command line)
- automatically tag it
- automatically create a release
- automatically create a changelog
- commit and push all the goodies
@seriousben that sounds good.
I'm not sure whether gren's responsibility ends and npm scripts begins tbh.
I do agree that:
- We should support semantic versioning and, in order to achieve it, we should implement something like Angular commit messages for
commits,issuesandPRs. - Option to
commitandpushthe CHANGELOG.md file viagren.
In an ideal scenario you would have a hook in your CI to check for new tags, that triggers gren release and changelog commands.
What do you think?
Voting for this too. I really like gren but creating a new release is a bit cumbersome now:
- need to create a new (empty) release at GitHub first
- then running
gren releasethis release is updated with actual data from the closed issues between the new release and the previous one - then running
gren changelogwill update changelog which now includes data from this new release. However, this new changelog is not part of the release, is it?
Maybe I'm doing something wrong and there is an easier way?
Thanks
@luboskmetko I totally see your point.
(Keep in mind tho that you don't have to create an empty release, the only thing you need is to tag a commit and push it).
The problem is that gren needs tags in order to generate release notes and there is no workaround that I can think of, unless we add the option to base a release to a commit SHA, passing tag_name manually (which isn't ideal).
Anything you can think of?
@alexcanessa thanks for the response. I don't know much about this stuff but will try your advice with tags to see if I can optimize my workflow. Will get back to you if I come up with something.