Skip to content

Commit bd25be0

Browse files
committed
feat: version sync covers UXP + CI runs tests before build
Version sync (scripts/sync_version.py): - Added 3 new UXP targets: manifest.json, main.js VERSION const, index.html version display — no more manual updates needed - Now syncs 18 targets total (was 15) CI workflow (.github/workflows/build.yml): - Added pytest test step (89 tests) before PyInstaller build - Added smoke test imports for new v1.5.0 modules (core, NLP, CLI) CLAUDE.md: - Updated version sync note to reflect 18 targets
1 parent 25c666e commit bd25be0

3 files changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,18 @@ jobs:
4242
pip install ruff
4343
ruff check opencut/ --select E,F,I --ignore E501
4444
45-
- name: Smoke test
45+
- name: Run tests
46+
run: |
47+
python -m pytest tests/ -v --tb=short
48+
49+
- name: Smoke test imports
4650
run: |
4751
python -c "from opencut.server import app; print('Import OK')"
4852
python -c "from opencut.security import get_csrf_token; print('Security OK')"
4953
python -c "from opencut.jobs import _new_job; print('Jobs OK')"
54+
python -c "from opencut.core.repeat_detect import detect_repeated_takes; print('Core OK')"
55+
python -c "from opencut.core.nlp_command import parse_command; print('NLP OK')"
56+
python -c "from opencut.cli import cli; print('CLI OK')"
5057
5158
- name: Build with PyInstaller
5259
run: pyinstaller opencut_server.spec

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
## Version
123123
- Current: **v1.5.6**
124124
- All version strings: `pyproject.toml`, `__init__.py`, `CSXS/manifest.xml` (ExtensionBundleVersion + Version), `com.opencut.uxp/manifest.json`, `com.opencut.uxp/main.js` (VERSION const), `index.html` version display, README badge
125-
- Use `python scripts/sync_version.py --set X.Y.Z` to update all at once (also manually update UXP manifest.json and UXP main.js — not yet covered by sync script)
125+
- Use `python scripts/sync_version.py --set X.Y.Z` to update all 18 targets at once (including UXP files)
126126

127127
## Gotchas
128128
- `subprocess.run` must use `_sp.run` (the alias) in route files

scripts/sync_version.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,24 @@
104104
r'(#define MyAppVersion\s*")[0-9]+\.[0-9]+\.[0-9]+(")',
105105
r'\g<1>{v}\g<2>',
106106
),
107+
# UXP manifest.json
108+
(
109+
"extension/com.opencut.uxp/manifest.json",
110+
r'("version":\s*")[0-9]+\.[0-9]+\.[0-9]+(")',
111+
r'\g<1>{v}\g<2>',
112+
),
113+
# UXP main.js VERSION constant
114+
(
115+
"extension/com.opencut.uxp/main.js",
116+
r'(const VERSION\s*=\s*")[0-9]+\.[0-9]+\.[0-9]+(")',
117+
r'\g<1>{v}\g<2>',
118+
),
119+
# UXP index.html version display
120+
(
121+
"extension/com.opencut.uxp/index.html",
122+
r'(<span class="oc-version">v)[0-9]+\.[0-9]+\.[0-9]+(</span>)',
123+
r'\g<1>{v}\g<2>',
124+
),
107125
]
108126

109127

0 commit comments

Comments
 (0)