File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed
Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1414 - name : Checkout repository
1515 uses : actions/checkout@v4
1616
17+ - name : Setup Python
18+ uses : actions/setup-python@v5
19+ with :
20+ python-version : ' 3.12'
21+
22+ - name : Sync manifest version
23+ run : |
24+ python -m pip install --upgrade pip setuptools_scm
25+ python tools/update_manifest_version.py
26+
1727 - name : Setup Node.js
1828 uses : actions/setup-node@v4
1929 with :
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ dev = [
3030 " basedpyright>=1.25.0" ,
3131 " pytest>=8.3.0" ,
3232 " ruff>=0.9.3" ,
33+ " setuptools-scm>=8" ,
3334 " types-pyyaml>=6.0.12.20241230" ,
3435 " types-requests>=2.32.0.20241016" ,
3536]
Original file line number Diff line number Diff line change 1+ """Helper scripts for project tooling."""
Original file line number Diff line number Diff line change 1+ """Update manifest.json version from setuptools_scm."""
2+
3+ from __future__ import annotations
4+
5+ import json
6+ from pathlib import Path
7+
8+ from setuptools_scm import get_version
9+
10+
11+ def main () -> None :
12+ manifest_path = Path ("manifest.json" )
13+ manifest_data = json .loads (manifest_path .read_text ())
14+
15+ manifest_data ["version" ] = get_version ()
16+ manifest_path .write_text (json .dumps (manifest_data , indent = 2 ) + "\n " )
17+
18+
19+ if __name__ == "__main__" :
20+ main ()
You can’t perform that action at this time.
0 commit comments