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:
Zhengshou Lai
2026-07-22 23:19:34 +08:00
parent c69961a9cb
commit d428436fca
2 changed files with 11 additions and 2 deletions
+10 -1
View File
@@ -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
View File
@@ -1,6 +1,6 @@
[project]
name = "mytoolkit"
version = "0.1.0"
version = "0.2.0"
description = "Personal CLI toolkit"
requires-python = ">=3.9"
dependencies = [