c4urself / bump2version

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

Replace does not work if colon symbol is present #271

Open angordeyev opened 1 year ago

angordeyev commented 1 year ago

An Elixir application has the version in configuration file in the following format:

...
[
      ...
      version: "1.0.0",
      ...
]
...

I use the following .bumpversion.cfg:

[bumpversion]
current_version = 1.0.0

[bumpversion:file:mix.exs]
search = version: "{current_version}"
replace = version: "{new_version}"

The result is:

...
[
      ...
      version: "version: "1.0.0"",
      ...
]
...

The expleted result is:

The result is:

...
[
      ...
      version: "1.0.1"",
      ...
]
...

I have tried to escape it with \: but it does not work either.

kdeldycke commented 11 months ago

This issue has been solved by bump-my-version thanks to its transition to TOML-based configuration files.