#!/usr/bin/env python

"""Release the application."""

import subprocess
import sys


def main():
    """Create the release."""
    bump = sys.argv[1]
    assert bump in ('patch', 'minor', 'major')
    subprocess.run(("bumpversion", bump), check=True)
    subprocess.run(("git", "push"), check=True)
    subprocess.run(("git", "push", "--tags"), check=True)


if __name__ == "__main__":
    main()

@@ -59,116 +59,485 @@
 ort 
-subprocess%0Aimport sys%0A%0A%0Adef main():%0A    %22%22%22Create the release.%22%22%22%0A    bump = sys.argv%5B1%5D%0A    assert bump in 
+argparse%0Aimport subprocess%0A%0A%0Adef parse_arguments():%0A    %22%22%22Return the command line arguments.%22%22%22%0A    bump = subprocess.check_output((%22bumpversion%22, %22--list%22, %22--dry-run%22, %22--allow-dirty%22, %22part%22), text=True)%0A    current_version = %5Bline for line in bump.split(%22%5Cn%22) if line.startswith(%22current_version%22)%5D%5B0%5D.split(%22=%22)%5B1%5D%0A    parser = argparse.ArgumentParser(description=f'Release Quality-time. Current version is %7Bcurrent_version%7D.')%0A    parser.add_argument('version', choices=
 ('pa
@@ -563,96 +563,145 @@
 or')
+)
 %0A    
-subprocess.run((%22bumpversion%22, bump), check=True)%0A    subprocess.run((%22git%22, %22push%22
+return parser.parse_args()%0A%0A%0Adef main():%0A    %22%22%22Create the release.%22%22%22%0A    subprocess.run((%22bumpversion%22, parse_arguments().version
 ), c
@@ -749,16 +749,23 @@
 sh%22, %22--
+follow-
 tags%22), 

Add argument parser. (#415)