c4urself / bump2version

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

Is it possible to set current_version automatically? #207

Closed dudicoco closed 3 years ago

dudicoco commented 3 years ago

Hi,

Is it possible to locate the current version automatically within a file instead of specifying it?

For example, if I have a file with the content 1.0.0 I would expect bump2version to automatically grep the current version and bump it accordingly.

Thanks

dudicoco commented 3 years ago

@florisla perhaps you can give input here?

florisla commented 3 years ago

Hi,

Currently this is not possible. It is being considered for a future release though.

Don't wait for it, this could take a while.

dudicoco commented 3 years ago

Thanks @florisla.

As a workaround, i've did the following:

bump2version --allow-dirty patch VERSION --current-version `cat VERSION`
florisla commented 3 years ago

Thanks for sharing the workaround!

Closing this since the feature is tracked in #185.