Skip to content
  • David Runge's avatar
    argparse: Extend to show version and making project optional · d53ae4d9
    David Runge authored
    arch_release_promotion/argparse.py:
    Change `ArgParseFactory.__init__()` to allow overriding the program name
    add a `-V`/`--version` argument which may be used to trigger showing the
    version of the program.
    Change `ArgParseFactory.promote()` to replace the required `name`
    argument with the optional `-p`/`--project` argument and adding an
    optional `-r`/`--release` argument which may be used to override the
    release version to promote. Print program name and version information
    and exit early if version information is requested.
    
    tests/test_argparse.py:
    Change tests to accomodate for the new optional arguments.
    
    arch_release_promotion/cli.py:
    Replace the use of `args.name` with `args.project`.
    d53ae4d9