cookiejar / cookietemple

A collection of best practice cookiecutter templates for all domains and languages with extensive Github support ⛺
https://cookietemple.com
Apache License 2.0
157 stars 10 forks source link

Question about release_drafter / bump-version #1040

Open picciama opened 1 year ago

picciama commented 1 year ago

Question

Maybe a stupid question of a not so experienced developer:

I do not quite get how to properly use the release drafter in combination with cookietemple bump-version. It adds the pull requests that were made to development. But it keeps adding everything, including what has already been part of a previous release.

When is the time to use cookietemple bump-version? My current workflow is:

  1. make sure everything runs on development
  2. git checkout -b release/xyz
  3. cookietemple bump-version on the release branch
  4. merge release into master
  5. merge master back into development

Of course it also adds the PR from master back into development. I should also mention my default branch is master, not development (as it is in the cookietemple repo). And it doesn't seem to get that the PRs previous to the bump-version should not be part of the changelog for the current draft. So does that mean we should first bump the version on the development after the last merge from master back into development?

Could you give some best practise advice and could you document it somehwere on cookietemple.readthedocs.io please? Also it would be cool to have an additional flag such as cookietemple bump-version --publish to automatically publish the current draft release.

Imipenem commented 1 year ago

Hey, thanks for the question:

I should also mention my default branch is master, not development (as it is in the cookietemple repo).

Any specific reasoning for this? I'd always recommend setting the default branch to anything but master/main.

When is the time to use cookietemple bump-version?

My workflow is typically to first make sure everything runs on dev, then when I'm ready to release, bump the version on dev branch and checkout to a new release branch and release (maybe after some minor fixes though). I don't know whether that's the best approach out there or not, but it works very well (for me at least).

Also it would be cool to have an additional flag such as cookietemple bump-version --publish to automatically publish the current draft release.

I'm not quite sure whether this should be part of bump-version or a command at it's own, but an interesting idea. What do you think @Zethson ?