Skip to content

Commit ca03523

Browse files
committed
added --version argument to tira-cli
1 parent 5620b7b commit ca03523

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

python-client/tira/tira_cli.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env python
22
import argparse
3+
from platform import python_version
34
from typing import Optional
45

6+
from tira import __version__
57
from tira.rest_api_client import Client as RestClient
68
import logging
79

@@ -70,6 +72,8 @@ def upload_command() -> None:
7072
"""
7173
def parse_args():
7274
parser = argparse.ArgumentParser(prog='tira-cli')
75+
version_str = f'TIRA v{__version__} using Python v{python_version()}'
76+
parser.add_argument('-v', '--version', action='version', version=version_str)
7377

7478
# Register all subcommands here:
7579
subparsers = parser.add_subparsers(dest='command', required=True)

0 commit comments

Comments
 (0)