tomasbjerre/git-changelog-gradle-plugin

Question on potential release process

cdancy opened this issue · 3 comments

Hey @tomasbjerre. Finally got around to looking at this plugin and am going to try to implement it in a project I have going. But I have a few questions:

1.) I assume executing the "changelog task" will write to the changelog file thus making the git repo dirty? Does it do any sort of committing once the change has been made?

2.) The reason I asked the first question is that I'd like to use this in combination with the gradle-git plugin. This plugin, upon triggering the release task, requires that the git repo be clean with NO modifications at all present. So I'm trying to figure out how best to use this plugin in conjunction with that one. Maybe the process would go something like: generate changelog, commit changes, then trigger release. Maybe that's as easy as we can hope?

3.) Does it make sense to trigger the "changelog" task after every commit or just when one is ready to release? What are others doing and/or what do you recommend? I like the idea of having the changelog continually kept up-to-date to allow folks to see what is in the queue for the next release.

Any thoughts one way or the other would be greatly appreciated. Thanks AOT!!!

  1. No it does not commit anything. Just creates the file.

  2. I don't have any pretty solution for Gradle, I just use it like this. With Maven I am doing it like this. I both cases I usually do an extra commit after release, like this.

  3. I try to keep it updated. And I try even harder to keep it updated after release =) Don't know much about how others are doing it.

I think most users of the underlying lib is using it through the Jenkins plugin. Where, if using git-flow, you may generate changelog from first commit to master. Or releasenotes from master to develop.

Fair enough. I can certainly automate an easy commit process once the file has been changed.

What about generating this changelog prior to a release? I'm specifically thinking of the below example. Where does the unreleased banner come from and how does it know when it's a "release" generation or not?

https://github.com/tomasbjerre/git-changelog-gradle-plugin/blob/master/git-changelog-gradle-plugin-example/CHANGELOG_GITLAB.md

Unreleased is a special item in the list of tag:s created with all things that are not included in any actual tag. You can also change that to something else.

The full specification of supplied information in the context of the template is available here. I always have loop through tags on and then other information within each tag. But you can also loop issues, authors or commits on the top level.