Skip to content

Commit

Permalink
terrabutler: click.py: Add new versioning system
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelNdeCarvalho committed May 13, 2022
1 parent d6568a9 commit 6ff3f70
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions terrabutler/click.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 6ff3f70

Please sign in to comment.