feat: add version management with setuptools-scm

- Configure hatch-vcs for automatic version generation from git tags
- Update pyproject.toml to use dynamic versioning
- Add src/_version.py for runtime version access
- Update src/__init__.py to import version from _version
- Add __APP_VERSION__ to frontend vite config
- Add version script to frontend package.json
- Update CI workflows to trigger on version tags instead of branches
This commit is contained in:
fawney19
2025-12-14 00:12:37 +08:00
parent 2f9d943647
commit b3fbe00657
9 changed files with 144 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "aether"
version = "1.0.0"
dynamic = ["version"]
description = "Proxy server enabling Claude Code to work with OpenAI-compatible API providers"
readme = "README.md"
authors = [
@@ -76,6 +76,7 @@ dev-dependencies = [
"isort>=5.12.0",
"mypy>=1.0.0",
"pyinstaller>=6.15.0",
"hatch-vcs>=0.5.0",
]
[tool.black]
@@ -89,6 +90,12 @@ line_length = 100
[tool.hatch.build.targets.wheel]
packages = ["src"]
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/_version.py"
[tool.mypy]
python_version = "3.9"
warn_return_any = true