From 6ff3f700590d6af4426d64a571ed23e875ce67d4 Mon Sep 17 00:00:00 2001 From: MiguelNdeCarvalho Date: Fri, 13 May 2022 15:52:23 +0100 Subject: [PATCH] terrabutler: click.py: Add new versioning system --- terrabutler/click.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/terrabutler/click.py b/terrabutler/click.py index 17ad9eb..657a2e7 100755 --- a/terrabutler/click.py +++ b/terrabutler/click.py @@ -31,12 +31,18 @@ inception_init, inception_init_needed ) +from terrabutler.utils import is_semantic_version + + +VERSION = (f"v{__version__}" if is_semantic_version(__version__) + else __version__ + ) @click.group(context_settings=dict(help_option_names=['-h', '-help', '--help'])) -@click.version_option(version=__version__, prog_name=__name__.capitalize(), - message='%(prog)s v%(version)s') +@click.version_option(version=VERSION, prog_name=__name__.capitalize(), + message='%(prog)s: %(version)s') def main(): validate_settings()