Skip to content

Commit

Permalink
Add --version option
Browse files Browse the repository at this point in the history
Prints version information and exits.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
  • Loading branch information
Pennycook committed Mar 18, 2024
1 parent 2500ea9 commit 0dd9ee7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/codebasin
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ def guess_project_name(config_path):
def main():
# Read command-line arguments
parser = argparse.ArgumentParser(
description="Code Base Investigator v" + str(version),
description="Code Base Investigator " + str(version),
)
parser.add_argument(
"--version",
action="version",
version=f"Code Base Investigator {version}",
help="Display version information and exit.",
)
deprecated_args = parser.add_argument_group("deprecated options")
deprecated_args.add_argument(
Expand Down

0 comments on commit 0dd9ee7

Please sign in to comment.