your-tools / tbump

Bump software releases
BSD 3-Clause "New" or "Revised" License
158 stars 22 forks source link

How to bump version with updated changelog? #120

Closed iamgodot closed 3 years ago

iamgodot commented 3 years ago

I would like my changelog changes in the bump version commit as well, while currently it stops me with Repository is dirty error.

Great tool BTW, very useful :)

dmerejkowsky commented 3 years ago

This is currently not possible, by design.

The rationale is that you want to have a separate commit for the changelog, so it can be reviewable, and then you trust that tbump will do the right thing so you don't need to review tbump's automatic commit (which is it's all raison d'être)

What you could do is use something like towncrier, use code review for the news fragments, and then use a tbump hook to generate the changelog and make it part of the automatic commit.

Hope this helps.

iamgodot commented 3 years ago

This is currently not possible, by design.

The rationale is that you want to have a separate commit for the changelog, so it can be reviewable, and then you trust that tbump will do the right thing so you don't need to review tbump's automatic commit (which is it's all raison d'être)

What you could do is use something like towncrier, use code review for the news fragments, and then use a tbump hook to generate the changelog and make it part of the automatic commit.

Hope this helps.

On second thought, changelogs may need frequent changes or updates, so keep them in separate commits from bumpver could be a better idea, thanks.