chore: bump mytoolkit to 0.2.0 and read --version from package metadata
Align with xiaohe wheel deploy so VPS installs carry a clear package version.
This commit is contained in:
+10
-1
@@ -21,8 +21,17 @@ from mytoolkit.commands.completion_install import ensure_completions_installed
|
||||
from mytoolkit.commands.self_mgmt import update_cmd, uninstall_cmd
|
||||
|
||||
|
||||
def _cli_version() -> str:
|
||||
try:
|
||||
from importlib.metadata import version
|
||||
|
||||
return version("mytoolkit")
|
||||
except Exception:
|
||||
return "0.2.0"
|
||||
|
||||
|
||||
@click.group()
|
||||
@click.version_option(version="0.1.0", prog_name="mytoolkit")
|
||||
@click.version_option(version=_cli_version(), prog_name="mytoolkit")
|
||||
def cli():
|
||||
"""Personal CLI toolkit."""
|
||||
pass
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "mytoolkit"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
description = "Personal CLI toolkit"
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
|
||||
Reference in New Issue
Block a user