-
-
Notifications
You must be signed in to change notification settings - Fork 279
cz bump
generates broken commit when run from a subfolder.
#1371
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
Comments
Hi @jenstroeger , thanks for reporting this. I just verify this with the following. cd /tmp
mkdir test-cz
cd test-cz
git init
cz init
git add .
mkdir test
cd test
touch testfile
git add .
cz c
cz bump --change the CHANGELOG.md is generated in the |
Hi @Lee-W, I have reproduced the bug. |
Yep, I think so. 👀 |
@Lee-W thanks for the response! |
Sure! Thanks for helping out 🙂 |
@Lee-W yes, you reproduce this correctly. Basically, given my package repo and no matter what the current folder I’m in, I expect that running |
Description
When running
cz bump --changelog
from a folder other than git’s base thenThere’s no warning or error that the additional version files weren’t found either.
If
cz
runs under the assumption thatcwd
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, runningcz
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
Desired behavior
Update the actual CHANGELOG and bump files listed in version_files.
Screenshots
No response
Environment
The text was updated successfully, but these errors were encountered: