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