bumpversion icon indicating copy to clipboard operation
bumpversion copied to clipboard

Missing allowed 'part' values in commandline help

Open kamichal opened this issue 5 years ago • 2 comments

Help formed by argparse (bumpversion --help) does not tell what are allowed values for part argument. I mean the 'major', 'minor' and 'patch' (most probably, I believe) . The help should provide at least minimalistic knowledge required to run given script. In my case - I knew that there is nice "bumpversion" script but forgot how to call it. I got disappointed trying to find it in the help. I had to run a browser and google for manual, which is insane, because even the README.rst of this project does not list the allowed values.

kamichal avatar Feb 11 '19 13:02 kamichal

I had the same issue. I used bumpversion bugfix instead of bumpversion patch, and the result is that I have a scrambled version in setup.py:

version = 'version = '1.0.0''

And a big error message:

$ bumpversion bugfix
fatal: tag 'v1.0.0' already exists
Traceback (most recent call last):
  File "/home/patrick/bumpversion-example/env/bin/bumpversion", line 8, in <module>
    sys.exit(main())
  File "/home/patrick/bumpversion-example/env/lib/python3.10/site-packages/bumpversion/cli.py", line 137, in main
    _tag_in_vcs(vcs, context, args)
  File "/home/patrick/bumpversion-example/env/lib/python3.10/site-packages/bumpversion/cli.py", line 728, in _tag_in_vcs
    vcs.tag(sign_tags, tag_name, tag_message)
  File "/home/patrick/bumpversion-example/env/lib/python3.10/site-packages/bumpversion/vcs.py", line 138, in tag
    subprocess.check_output(command)
  File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.10/subprocess.py", line 524, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'tag', 'v1.0.0', '--message', 'Bump version: 1.0.0 → 1.0.0']' returned non-zero exit status 128.

patrickbucher avatar Mar 14 '22 08:03 patrickbucher

I agree - especially since most people will use them. But please also update the documentation - I had trouble confirming that the name 'patch' was what I wanted. It's in there, but buried, and as a newb it was pretty much the first thing I wanted.

mgrazebrook avatar Sep 06 '22 18:09 mgrazebrook