bump version and allow use of --version to see it
This commit is contained in:
parent
4a6e4e7bc0
commit
572c3d0316
@ -18,9 +18,9 @@ copyright = '2021 Soren Bjornstad'
|
|||||||
author = 'Soren Bjornstad'
|
author = 'Soren Bjornstad'
|
||||||
|
|
||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = "0.1.4"
|
version = "0.1.5"
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = "0.1.4"
|
release = "0.1.5"
|
||||||
|
|
||||||
|
|
||||||
# -- General configuration ---------------------------------------------------
|
# -- General configuration ---------------------------------------------------
|
||||||
|
2
setup.py
2
setup.py
@ -9,7 +9,7 @@ with open("README.md", "r") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="tzk",
|
name="tzk",
|
||||||
version="0.1.4",
|
version="0.1.5",
|
||||||
author="Soren I. Bjornstad",
|
author="Soren I. Bjornstad",
|
||||||
author_email="zettelkasten@sorenbjornstad.com",
|
author_email="zettelkasten@sorenbjornstad.com",
|
||||||
description="Build tool for TiddlyWiki Zettelkasten",
|
description="Build tool for TiddlyWiki Zettelkasten",
|
||||||
|
@ -13,6 +13,8 @@ from tzk import tw
|
|||||||
from tzk.util import (BuildError, fail, numerize, require_dependencies, pushd,
|
from tzk.util import (BuildError, fail, numerize, require_dependencies, pushd,
|
||||||
TZK_VERSION)
|
TZK_VERSION)
|
||||||
|
|
||||||
|
VERSION_INFO = f"tzk version {TZK_VERSION}"
|
||||||
|
|
||||||
|
|
||||||
class CliCommand(ABC):
|
class CliCommand(ABC):
|
||||||
"""
|
"""
|
||||||
@ -180,7 +182,7 @@ class VersionCommand(CliCommand):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def execute(self, args: argparse.Namespace) -> None:
|
def execute(self, args: argparse.Namespace) -> None:
|
||||||
print(f"tzk version {TZK_VERSION}")
|
print(VERSION_INFO)
|
||||||
|
|
||||||
|
|
||||||
class BuildCommand(CliCommand):
|
class BuildCommand(CliCommand):
|
||||||
@ -407,6 +409,12 @@ def launch():
|
|||||||
epilog="For full documentation, see https://tzk.readthedocs.io/en/latest/.",
|
epilog="For full documentation, see https://tzk.readthedocs.io/en/latest/.",
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter
|
formatter_class=argparse.RawDescriptionHelpFormatter
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--version",
|
||||||
|
action="version",
|
||||||
|
version=VERSION_INFO,
|
||||||
|
help=VersionCommand.help
|
||||||
|
)
|
||||||
|
|
||||||
subparsers = parser.add_subparsers()
|
subparsers = parser.add_subparsers()
|
||||||
for command in sorted(CliCommand.__subclasses__(), key=lambda i: i.__name__):
|
for command in sorted(CliCommand.__subclasses__(), key=lambda i: i.__name__):
|
||||||
|
@ -10,7 +10,7 @@ import sys
|
|||||||
from typing import Any, Callable, Dict, NoReturn
|
from typing import Any, Callable, Dict, NoReturn
|
||||||
|
|
||||||
|
|
||||||
TZK_VERSION = "0.1.4"
|
TZK_VERSION = "0.1.5"
|
||||||
|
|
||||||
|
|
||||||
class BuildError(Exception):
|
class BuildError(Exception):
|
||||||
|
Loading…
Reference in New Issue
Block a user