bumpversion icon indicating copy to clipboard operation
bumpversion copied to clipboard

is there a way so that 2 formats coexist?

Open dpinol opened this issue 9 years ago • 0 comments

I'd like to have a M.m.b(_RCX) format for releases and RCs, and a format DEV-ticket-SNAPSHOT for snapshots. Obviously to switch between one and the other format I'd need to do --new-version

The parsing is ok if I do: parse = ((?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)-?(?P<release>.*))|(DEV-(?P<ticket>\d+)-SNAPSHOT)

But for the serialization part, it force the first format found in the list, even if I do "--new-version". So with this I get DEV-0-SNAPSHOT when I do --new-version 2.5.3. Curiously, it correctly changes the version to 2.5.3 on .bumpversion, but not on my other files.

serialize =
        DEV-{ticket}-SNAPSHOT
        {major}.{minor}.{patch}-{release}
        {major}.{minor}.{patch}

And with this I get 0.0.0-gamma when I do --new-version DEV-999-SNAPSHOT. Again, it correctly changes the version to DEV-999-SNAPSHOT on .bumpversion, but not on my other files.

serialize =
        {major}.{minor}.{patch}-{release}
        {major}.{minor}.{patch}
        DEV-{ticket}-SNAPSHOT

thanks!

dpinol avatar Nov 23 '16 11:11 dpinol