commitizen icon indicating copy to clipboard operation
commitizen copied to clipboard

cz bump fails with --changelog and no local tag exists for local version

Open hongkongkiwi opened this issue 3 years ago • 2 comments

Description

In my situation there may be missing version tags for various reasons.

If the version in .cz.yaml is higher than the tag, it works just fine with a normal cz bump --yes

However, if I use: cz bump --yes --changelog it fails with the message No tag found to do an incremental changelog

If I delete the changelog then rerun it works fine.

It would be great to just have a flag which handles this, for example --overwrite-changelog or something like that.

Steps to reproduce

  1. Delete a local tag for a previous version after you have generated a changelog
  2. Update the version manually in the .cz.yaml file
  3. cz bump --changelog

Current behavior

No tag found to do an incremental changelog

Desired behavior

Flag to not fail on this error

Screenshots

No response

Environment

  • commitizen version: 2.27.1

hongkongkiwi avatar Jun 23 '22 04:06 hongkongkiwi

related to #463 (that I closed but that reappears from time to time when my linter touch the changelog file)

12rambau avatar Jul 18 '22 09:07 12rambau

I'm not sure whether we have an easy fix to this 🤔 We use git tag to do the operations. Also, it looks like an error out of commitizen's scope 🤔 @Woile What do you think?

Lee-W avatar Aug 14 '22 04:08 Lee-W

Out of scope. Commitizen expects things to be in-sync.

woile avatar Apr 28 '23 13:04 woile