We use bump2version to version our builds and releases in Gitlab, using a simple major.minor.patch (1.1.17) format.
Sometimes, however, it's useful to create versions outside the regular pipeline, with a custom version format, e.g. 1.1.17-test-1.
Trying bump2versions command line flags like this on a current version of 1.1.17:
bump2version.exe --search 1.0.17 --replace 1.0.17-testing --verbose --new-version 1.0.17-test-1 part
Don't give any errors, but produces the wrong version-string in all files where the version-string is being managed.
The .bumpversion.cfg file looks like this:
[bumpversion]
current_version = 1.0.17
[bumpversion:file:CMakeLists.txt]
search = MVR_VERSION "{current_version}"
replace = MVR_VERSION "{new_version}"
[bumpversion:file:VERSION.txt]
search = {current_version}
replace = {new_version}
[bumpversion:file:installer/mvr.iss]
search = #define MyAppVersion "{current_version}"
replace = #define MyAppVersion "{new_version}"
In each file where the version-string is supposed to be changed, the change looks like this:
set(MVR_VERSION "MVR_VERSION "1.0.17"" )
which is not right. Proper search/replace would be
set(MVR_VERSION "1.0.17-test-1" )
Any hints on how to use bump2versions flags to achieve a custom version?