Files
cms-SiteForge/scripts/verify_release.py
T
浅念 601451f22b upgrade: adopt V8.21.3 (V8.13→8.21.3: P5 SFTP/S3, P6 multilingual, editor overhaul, enterprise hardening)
Overlay ~150 upstream items onto our V8.12 base, preserving trade-pro
theme, registry tests, and design docs. Re-applied our patch set
(discovery/env_for/blocks.css/type-mapping/theme_color/frontend entries,
test_theme_pro_v3 mods) — all anchors survived upstream evolution.

New platform enhancement (fixes upgrade-introduced regression):
multilingual.site_locale now honors settings_json.locale, plus
PUT /api/i18n/sites/{id}/locale — standalone English sites get
<html lang='en'> under the V8.15 locale-rewrite pipeline.

compose: adopt V8.21.3 (image 8.21.3-dev.1, /api/ready probes, MySQL/S3
env) with project name pinned to siteforge-v8-10 (data volumes).

Tests: 356 passed / 11 failed — all 11 confirmed pre-existing in
pristine V8.21.3 on this host (10 upstream Windows env + our build test
now green after locale fix). Patch registry updated in plan doc.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-23 12:31:03 +08:00

26 lines
1.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Fast static checks before producing an official release archive."""
from pathlib import Path
import re
import subprocess
import sys
ROOT=Path(__file__).resolve().parent.parent
sys.path.insert(0,str(ROOT))
from app.version import VERSION
assert VERSION=='8.21.3-dev.1'
api=(ROOT/'app'/'main.py').read_text(encoding='utf-8')
assert 'return builder.build(' not in api, 'A synchronous request-thread build has reappeared'
assert "@app.post('/api/sites/{site_id}/builds', status_code=202)" in api
assert 'VERSION' in api
for name in ('automotive','industrial','corporate','minimal'):
theme=ROOT/'themes'/name
manifest=theme/'manifest.json'
assert manifest.is_file() and (theme/'pro.html').is_file()
assert len(list((theme/'pages').glob('*.html')))>=14
for file in (ROOT/'requirements.lock',ROOT/'requirements-dev.lock'):
pins=[ln for ln in file.read_text(encoding='utf-8').splitlines() if ln and not ln.startswith('#')]
assert pins and all(re.fullmatch(r'[a-zA-Z0-9_.-]+==[0-9][a-zA-Z0-9_.!+\-]*',ln) for ln in pins)
assert (ROOT/'.github/workflows/ci.yml').is_file()
for file in (ROOT/'app/static').glob('*.js'):
subprocess.run(['node','--check',str(file)],check=True)
print('PASS: version, 4× themes, worker route, pinned dependencies, CI workflow, JS syntax')