Skip to content

Commit

Permalink
hotfix: broke default group + --version; bumpver
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanceNCounter committed Oct 6, 2021
1 parent 6464dd2 commit acf0bab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bak/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BAK_VERSION = "0.2.2a1"
BAK_VERSION = "0.2.2a2"
10 changes: 6 additions & 4 deletions bak/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ def on_call(*args, **kwargs):

@click.group(cls=DefaultGroup, default='\0', no_args_is_help=True, help=BASIC_HELP_TEXT,
invoke_without_command=True)
# The --version option is duplicated here to make Click render it in bak --help
# default command behavior is duplicated here because it's cleaner from a Click perspective,
# which is to say that it gets the desired behavior across the board. ugly but it works!
@click.option("--version", required=False, is_flag=True, help="Print current version and exit.")
def bak():
pass
def bak(version:bool=False):
if version:
create_bak_cmd(None, version)


@bak.command("\0", hidden=True)
@normalize_path()
@click.option("--version", required=False, is_flag=True)
@click.option("--version", required=False, is_flag=True, help="Print current version and exit.")
@click.argument("filename", required=False, type=click.Path(exists=True))
def _create(filename, version):
create_bak_cmd(filename, version)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'rich==9.1.0']

setup(name='bak',
version='0.2.2a1',
version='0.2.2a2',
description='the .bak manager',
author='ChanceNCounter',
author_email='[email protected]',
Expand Down

0 comments on commit acf0bab

Please sign in to comment.