Print current version
Closed this issue ยท 4 comments
mradecki commented
- bump-my-version version: 0.21.1
- Python version: 3.9
- Operating System: Ubuntu
Description
I would like to retrieve current version from .bumpmyversion and get it stripped to stdout, like:
> bump-my-version show current
> 1.0.7
It seems obvious to have such functionality, where is it?
What I Did
I did various approaches bump-my-version show | sed/awk
I wrote a script that parses .bumpversion.toml and retrieves it.
So I have this working, but it just feels wrong
coordt commented
You almost had it:
bump-my-version show current_version
mradecki commented
Thanks for quick response @coordt !
I knew it must exists somwhere ๐
Is it documented anywhere?I couldn't find it help or in github README
โฏ bump-my-version show --help
Usage: bump-my-version show [OPTIONS] [ARGS]...
Show current configuration information.
โญโ Options โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ --config-file FILE Config file to read most of the variables from. โ
โ --format -f [default|yaml|json] Config file to read most of the variables from. โ
โ --increment -i TEXT Increment the version part and add `new_version` to the โ
โ configuration. โ
โ --help -h Show this message and exit. โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
coordt commented
I thought I had, but I can't find it in the docs. I guess I know what I'm doing today...
coordt commented
I've added improved documentation for the show command. I need to do the others, as well, but I keep getting sidetracked.