Skip to content

Commit f46cb33

Browse files
authored
Merge pull request #37 from zhujian0805/main
feat: implement dynamic version detection from git tags
2 parents 29951bc + 14a6994 commit f46cb33

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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.0.3"
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)