Commit c84e410f authored by Vasili's avatar Vasili

Add --version

parent 578af18e
...@@ -8,12 +8,15 @@ import sys ...@@ -8,12 +8,15 @@ import sys
from pathlib import PurePath from pathlib import PurePath
from urllib.parse import urlparse from urllib.parse import urlparse
from gitcu import __version__ as VERSION
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
def parse_args(args): def parse_args(args):
'''Parses command line options. Returns a Namespace.''' '''Parses command line options. Returns a Namespace.'''
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('--version', action='version', version=VERSION)
parser.add_argument('-d', '--debug', action='store_true') parser.add_argument('-d', '--debug', action='store_true')
parser.add_argument('-x', parser.add_argument('-x',
'--dry-run', '--dry-run',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment