Skip to content

Commit

Permalink
Bump version, add --version
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanceNCounter committed Jan 21, 2021
1 parent f55f293 commit 2acee46
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions bak/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version = "0.0.1a1"
8 changes: 6 additions & 2 deletions bak/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from click_default_group import DefaultGroup

from bak import commands
from bak import version as bak_version


def __print_help():
Expand All @@ -23,10 +24,13 @@ def bak():


@bak.command("\0", hidden=True)
@click.option("--version", required=False, is_flag=True)
@click.argument("filename", required=False, type=click.Path(exists=True))
# Ensures that 'bak --help' is printed if it doesn't get a filename
def create(filename):
if not filename:
def create(filename, version):
if version:
click.echo(f"bak version {bak_version}")
elif not filename:
__print_help()
else:
commands.create_bakfile(filename)
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.0.1a',
version='0.0.1a1',
description='the .bak manager',
author='ChanceNCounter',
author_email='[email protected]',
Expand Down

0 comments on commit 2acee46

Please sign in to comment.