callowayproject/bump-my-version

Print current version

Closed this issue ยท 4 comments

  • 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

You almost had it:

bump-my-version show current_version

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.                                          โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

I thought I had, but I can't find it in the docs. I guess I know what I'm doing today...

I've added improved documentation for the show command. I need to do the others, as well, but I keep getting sidetracked.