github-release-notes icon indicating copy to clipboard operation
github-release-notes copied to clipboard

Create a release commit with the changelog

Open seriousben opened this issue 8 years ago • 6 comments

I would really like gren to also create a "release" commit containing the changelog.

seriousben avatar Nov 06 '17 13:11 seriousben

This is a very good idea for an option.

Would you think it should push it too?

alexcanessa avatar Nov 06 '17 15:11 alexcanessa

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:

  1. My project is ready to release
  2. 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 avatar Nov 06 '17 15:11 seriousben

@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, issues and PRs.
  • Option to commit and push the CHANGELOG.md file via gren.

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?

alexcanessa avatar Nov 14 '17 10:11 alexcanessa

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 release this release is updated with actual data from the closed issues between the new release and the previous one
  • then running gren changelog will 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 avatar Nov 24 '17 09:11 luboskmetko

@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 avatar Nov 24 '17 12:11 alexcanessa

@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.

luboskmetko avatar Nov 28 '17 13:11 luboskmetko