Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commitizen tries to create a tag eventhough no increment is detected and it fails with tag already exists. #280

Closed
rio opened this issue Oct 13, 2020 · 3 comments · Fixed by #284

Comments

@rio
Copy link

rio commented Oct 13, 2020

Description

Whenever something is merged in our main branch commitizen checks if a version bump is required. Usually it's fine but whenever no increment is detected it will still try to create a tag while it shouldn't. Because the version is still the same and matches a previously created tag the command and the pipeline fails. Am I just not handling this correctly? I can't imagine nobody has run into this yet.

Steps to reproduce

Make sure a git tag exists that matches the version commitizen is tracking. Create a new commit that shouln't trigger a version bump then run cz bump and watch it fail.

bump: version 0.10.2 → 0.10.2
tag to create: v0.10.2
increment detected: None
fatal: tag 'v0.10.2' already exists

Desired behavior

I think it shouldn't try to create a git tag if no change is detected.

@rio rio added the type: bug label Oct 13, 2020
@woile
Copy link
Member

woile commented Oct 13, 2020

I think this could be solved by adding a tag_exist check in here.

I'm a bit busy at the moment, but once I find some time I'll tackle some current issues.

@Lee-W
Copy link
Member

Lee-W commented Oct 14, 2020

I think this one also relates to #118 . In my own project, I use this error code to avoid pipeline failed. I'll be a biy busy recently. Will see whether I can have more time to solve isssues on November.

christian-hawk added a commit to christian-hawk/commitizen that referenced this issue Oct 25, 2020
… creating existing tag

raises NoneIncrementExit if `increment is None and new_tag_version == current_tag_version`

commitizen-tools#280
@christian-hawk
Copy link
Contributor

@woile plz check #285 if possible, related to #284

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants