question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Bump failes if Changelog exists

See original GitHub issue

Description

When i run cz bump it fails unless i delete the CHANGELOG.md generated by the last bump. While the version is bumped and all files are changed in regard to the version in there, the commit and tag isn’t created

Steps to reproduce

  1. clone https://github.com/FactoryRally/game-controller
  2. checkout commit 45d5049d69ee6c0d3a5b879caa619d1cab58f575
  3. run cz bump
  4. delete CHANGELOG.md
  5. run cz bump again

Current behavior

nitonfx@laptop:/path/game-controller$ cz bump
bump: version 2.2.0b0 → 2.2.0
tag to create: v2.2.0
increment detected: MINOR

No tag found to do an incremental changelog
nitonfx@laptop:/path/game-controller$ rm CHANGELOG.md
nitonfx@laptop:/path/game-controller$ cz bump
bump: version 2.2.0b0 → 2.2.0
tag to create: v2.2.0
increment detected: MINOR

Done!

Desired behavior

A clearer message whats going wrong or it just working.

Environment

  • commitizen version: 2.13.0
  • python version: 2.7.17
  • operating system: Linux

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Lee-Wcommented, May 1, 2021

Hi @phildong , thanks for reporting. I just confirm it’s reproducible on my machine.

1reaction
phildongcommented, Apr 30, 2021

I believe I’m seeing very similar behavior, and I believe this only happens when the last version is a pre-release. Here is a reproducible example I’m able to come up with:

# step1 init everything, not exactly relevant to the bug
git init
cz init
git add .
git commit -m "chore: add config"
git tag 0.0.1

# step2 add a dummy feature and make a pre-release
git commit -m "feat: first feat" --allow-empty
cz bump --prerelease rc --changelog

# step3 add another feature and try to do incremental changelog
git commit -m "feat: second feat" --allow-empty
cz changelog --incremental

The last line would fail with No tag found to do an incremental changelog As @nbrugger-tgm noted clearing the content of changelog would work around this, but of course that would clear any custom edits in the changelog. However everything would be fine if I don’t do --prerelease in step2.

I’m using git version 2.31.1 and cz version 2.17.4

Let me know if this is reproducible/helpful!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version bumping isn't working properly based on Commit types
I'm using commitzen to take care of my commits, but when I make a release, standard-version isn't bumping based on my commits and...
Read more >
Changelog — Python 3.11.1 documentation
The errno modules exposes the new error number. getpath.py now ignores PermissionError when it cannot open landmark files pybuilddir.txt and ...
Read more >
ChangeLog | Sudo
c: Call terminate_command() with use_pgrp = false when not running in a pty. When sudo runs a command in the user's existing terminal...
Read more >
Bigtop Project Release Notes
[BIGTOP-3589] - Fix build failure of Alluxio caused by buildnumber-maven-plugin · [BIGTOP-3595] - The webui module is missing in the RPM package ...
Read more >
VMware Tanzu Application Service for VMs v2.11 Release ...
If you try to create or update a router group to include system component ports, the Routing API returns an error. Current invalid...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found