Skip to content

Commit

Permalink
feat: add cli option to emit version info
Browse files Browse the repository at this point in the history
  • Loading branch information
ejseqera committed Jan 10, 2024
1 parent b173c9c commit a34d85a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion seqerakit/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from pathlib import Path
from seqerakit import seqeraplatform, helper, overwrite, dump
from seqerakit.seqeraplatform import ResourceExistsError, ResourceCreationError
from seqerakit import __version__


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -86,6 +87,13 @@ def parse_args(args=None):
help="Prefix to use for outputting YAML definition files (optional)\n"
"If not provided, the workspace name will be used as the prefix",
)
parser.add_argument(
"--version",
"-v",
action="version",
version=f"%(prog)s v{__version__}",
help="Show the current version number and exit",
)
return parser.parse_args(args)


Expand Down Expand Up @@ -162,7 +170,6 @@ def main(args=None):
" No YAML(s) provided. Please provide atleast one YAML configuration file."
)
sys.exit(1)

if options.dump:
if not options.workspace:
logging.error(
Expand Down

0 comments on commit a34d85a

Please sign in to comment.