Skip to content
This repository has been archived by the owner on Sep 3, 2023. It is now read-only.

Commit

Permalink
feat: add version argument
Browse files Browse the repository at this point in the history
Closes #155
  • Loading branch information
ericswpark committed May 22, 2023
1 parent 8187955 commit e3c5872
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions shippy/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def main():

lower_logger_level()

if args.version:
print(__version__)
return

if args.debug:
print_warning("Debug mode has been turned on!")
logger.add(sink="shippy_{time}.log", level="DEBUG", enqueue=True)
Expand Down Expand Up @@ -172,6 +176,12 @@ def init_argparse():
action="store_true",
help="Enable debug mode",
)
parser.add_argument(
"-v",
"--version",
action="store_true",
help="Show version of shippy and exit",
)
return parser.parse_args()


Expand Down

0 comments on commit e3c5872

Please sign in to comment.