mbarkhau / bumpver

BumpVer: Automatic Versioning
https://github.com/mbarkhau/bumpver
MIT License
199 stars 36 forks source link

Not all changed files staged and committed #218

Closed SRFU-NN closed 1 year ago

SRFU-NN commented 1 year ago

I have an issue where bumpver doesn't stage and commit all of the changes it has made. As best I can tell, it fails when there is capital letters in a folder name on the path to a file.

Reproduction steps:

  1. Fetch https://github.com/SRFU-NN/test_bumpver/tree/main/src (minimal example)
  2. Create a virtual environment
  3. Install bumpver version 2023.1125
  4. Run bumpver update --patch

Expected results: All 4 copies of test.txt have updated version, and are included in the tagged commit.

Actual result: Three copies of test.txt has updated version and are included in the tagged commit. src\CaPiTaLiZaTiOn\test.txt has updated version, but is not staged.

Environment: Windows 10 Enterprise, Version 10.0.19044 Build 19044 Python 3.9.4 bumpver version 2023.1125

mbarkhau commented 1 year ago

Thank you for this report. I imagine this is a duplicate of #204.

SRFU-NN commented 1 year ago

It seems very similar. I suppose this issue should just be closed, then?

mbarkhau commented 1 year ago

Yes, I've closed it. If you can help to figure out how to fix this, I'd greatly appreciate it.

SRFU-NN commented 1 year ago

A quick test indicates that pathlib does not have the same issue as pathlib2 – though I know going to an unsupported package is not a good idea.

I will investigate some more.

SRFU-NN commented 1 year ago

You could try

try: import pathlib as pl except: import pathlib2 as pl

to ensure compatibility on old versions of python. If that is why you use pathlib2 and not the built-in pathlib.

I will try to make a working example of the issue and raise it with pathlib2.

SRFU-NN commented 1 year ago

I have created an issue in pathlib2: https://github.com/jazzband/pathlib2/issues/86

mbarkhau commented 1 year ago

@SRFU-NN I'd like to somehow test the changes in PR #219. Since we don't have windows in our CI system, perhaps you can help with this? Can you review PR #219 ?

SRFU-NN commented 1 year ago

@SRFU-NN I'd like to somehow test the changes in PR #219. Since we don't have windows in our CI system, perhaps you can help with this? Can you review PR #219 ?

I'll look into it.