peritus / bumpversion

Version-bump your software with a single command
https://pypi.python.org/pypi/bumpversion
MIT License
1.5k stars 147 forks source link

--list-fields option added #96

Closed lgiordani closed 9 years ago

lgiordani commented 9 years ago

I added a small option to output just the value of some fields. This is useful when, for example, using git flow. You want to know in advance the new release number to create le release branch, and with just --list you need to grep and sed the number. Not a complex job, but with this option you just issue "bumpversion --list-fields new_version " and get the value.

peritus commented 9 years ago

Hm. I usually would've replied with "just use grep, it's supposed to be composable that way" but you already said that.

lgiordani commented 9 years ago

I admit it can be overkill. If you think so no problem, just close the PR.

peritus commented 9 years ago

I'm kind of unsure about this. Is there a specific reason you want this ? Like, you're calling bumpversion from an environment that does not have an 'easy, just use grep and sed' equivalent like Microsoft Team Foundation Continous Integration Team Server(TM) ?

Maybe this should be documentation instead ? There's certainly something to it.

lgiordani commented 9 years ago

Good idea. Close this PR, I'll just edit the README and document a way to extract relevant information from --list. Does this fit?

peritus commented 9 years ago

Yes, thanks!

peritus commented 9 years ago

Also see #39 for some of the reasoning behind --list (and maybe a few bashisms).