Closed peritus closed 10 years ago
Different example, but this is how the config for this could look like:
[bumpversion]
commit = True
tag = True
[file:setup.cfg]
serialize =
{major}.{minor}.{patch}
[file:README.txt]
serialize =
{major}.{minor}
{major}.{minor}.{patch}
[file:BUILDNUMBER]
serialize =
{major}.{minor}.{patch}+{$USER}+${BUILDNUMBER}
This could supersede the files =
option, that would then need to be deprecated eventually.
Also, config files should be migrated automatically.
It would be good to also be able to define what should get converted into version number during the process per file.
Eg. I'd like to replace 'current version' header in my CHANGELOG.rst file with version number, and not the previous version with new one.
@fizyk Yes, that's indeed a desirable feature! Could you open another issue for that, because I feel this can be implemented independently of per-file config that is discussed here.
@peritus done: #41
@peritus From #42. I don't think this pull request would solve the problem I was trying to solve with #42 because I want a very minimal installation. IE no extra config files unless absolutely necessary . I'd prefer command line only.
Implemented, will be part of v0.5.0
This will be part of the upcoming version 0.5 — which you can install by running
sudo pip install https://github.com/peritus/bumpversion/archive/master.zip#egg=bumpversion-dev
I'd appreciate any testing before the release. Please note the new configuration format (documented in the README)
Oversimplifying, say I have the following
./package.json
that only contains 3-part semver version numbers:and a file
Contents/Info.plist
that includes the complete version string:I want to bump this so
package.json
contains1.2.4
andContents/Info.plist
contains1.2.4-build1239
afterwards.It should be possible to use different
--serialize
formats depending on the file. Also other options, if that makes sense.