Skip to content

Commit 14a6994

Browse files
author
James Zhu
committed
feat: implement dynamic version detection from git tags
- Replace hardcoded version with setuptools-scm for automatic versioning - Add setuptools-scm as runtime dependency - Version now dynamically derived from latest git tag - Includes fallback to hardcoded version when setuptools-scm unavailable
1 parent 2f8f3f2 commit 14a6994

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

code_assistant_manager/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
See DESIGN_PATTERNS_README.md for detailed documentation.
1515
"""
1616

17-
__version__ = "1.1.0"
17+
try:
18+
import setuptools_scm
19+
__version__ = setuptools_scm.get_version()
20+
except (ImportError, LookupError):
21+
__version__ = "1.1.0" # Fallback to hardcoded version
1822
__author__ = "Code Assistant Manager Contributors"
1923

2024
from .config import ConfigManager

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ dependencies = [
2222
"httpx>=0.27.0",
2323
"tomli>=2.0.0",
2424
"tomli-w>=1.0.0",
25+
"setuptools-scm>=8.0.0",
2526
]
2627

2728
[project.urls]
@@ -58,9 +59,6 @@ dev = [
5859
where = ["."]
5960
exclude = ["tests*", "build*"]
6061

61-
[tool.setuptools.dynamic]
62-
version = {attr = "code_assistant_manager.__version__"}
63-
6462
[tool.setuptools.package-data]
6563
"code_assistant_manager" = [
6664
"mcp/registry/**/*.json",

0 commit comments

Comments
 (0)