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

cz bump generates broken commit when run from a subfolder. #1371

Open
jenstroeger opened this issue Mar 15, 2025 · 0 comments
Open

cz bump generates broken commit when run from a subfolder. #1371

jenstroeger opened this issue Mar 15, 2025 · 0 comments

Comments

@jenstroeger
Copy link
Contributor

Description

When running cz bump --changelog from a folder other than git’s base then

  • changelog is generated in whatever folder I’m currently in instead of finding the file in the base folder, and
  • additional version_files aren’t updated at all because they’re not found.

There’s no warning or error that the additional version files weren’t found either.

If cz runs under the assumption that cwd should be the git base folder then that should be handled more gracefully, either using a warning or by finding the files correctly. As it is, running cz from some folder deeper inside of the git repo yields an unexpected and incorrect bump commit.

Steps to reproduce

Change into any subfolder in a git repo, then run cz bump --changelog.

Current behavior

  • No warnings or errors.
  • New CHANGELOG file in whichever subfolder I’m in, instead of amending the actual CHANGELOG.
  • None of the files listed in version_files are found and updated.

Desired behavior

Update the actual CHANGELOG and bump files listed in version_files.

Screenshots

No response

Environment

Commitizen Version: 4.1.0
Python Version: 3.13.2 (main, Feb  8 2025, 23:18:32) [Clang 14.0.3 (clang-1403.0.22.14.1)]
Operating System: Darwin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant