c4urself / bump2version

Version-bump your software with a single command
https://pypi.python.org/pypi/bump2version
MIT License
1.06k stars 133 forks source link

Trailing space after updating setup.cfg #201

Open JonZeolla opened 3 years ago

JonZeolla commented 3 years ago

After running bumpversion (more specifically python3 -c 'from bumpversion.cli import main as bumpversion; bumpversion(["--new-version", "2021.03.01", "unusedpart"])') with the following config, the result includes a trailing space after serialize =. Using v1.0.1 with Python v3.9.1

[bumpversion]
current_version = 2021.02.00
parse = (?P<year>2[0-1]\d{2})\.(?P<month>(0\d|1[0-2]))(.(?P<increment>\d{2}))?
serialize =
  {year}.{month}
  {year}.{month}.{increment}
commit_message = "Automatically generated release {new_version}"
commit = True
tag = True
push = True

[bumpversion:file:todo/__init__.py]

[bumpversion:file:README.md]

[bumpversion:file:setup.cfg]
florisla commented 3 years ago

Hi, you're not the first one bugged by this.

bump2version actually rewrites the full configuration file. Which we might stop doing altogether. Here's the meta-issue about it: #185.