Release 3.8.2.1: reliability, UI probe/logs, CI, signing gates.
Clear sysproxy on core death; probe+reconnect; subscription prune; Best ignores soft UDP; Windows tray; Android protocol gate; CI workflows. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+24
-1
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Sync versioninfo.json + build-macos.bat from internal/update/update.go constants."""
|
||||
"""Sync versioninfo.json, build-macos.bat, Android gradle, UI badge from update.go."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
@@ -10,6 +10,8 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
UPDATE_GO = ROOT / "internal" / "update" / "update.go"
|
||||
VERSIONINFO = ROOT / "versioninfo.json"
|
||||
BUILD_BAT = ROOT / "build-macos.bat"
|
||||
ANDROID_GRADLE = ROOT / "android" / "app" / "build.gradle.kts"
|
||||
INDEX_HTML = ROOT / "internal" / "appui" / "index.html"
|
||||
|
||||
|
||||
def read_consts() -> tuple[str, int]:
|
||||
@@ -28,6 +30,8 @@ def main() -> None:
|
||||
parts.append(0)
|
||||
major, minor, patch = parts[0], parts[1], parts[2]
|
||||
full = f"{ver}.{build}"
|
||||
display = f"{ver}+{build}"
|
||||
version_code = major * 1_000_000 + minor * 10_000 + patch * 100 + build
|
||||
|
||||
data = json.loads(VERSIONINFO.read_text(encoding="utf-8"))
|
||||
data["FixedFileInfo"]["FileVersion"] = {
|
||||
@@ -54,6 +58,25 @@ def main() -> None:
|
||||
else:
|
||||
print("build-macos.bat already in sync")
|
||||
|
||||
if ANDROID_GRADLE.exists():
|
||||
g = ANDROID_GRADLE.read_text(encoding="utf-8")
|
||||
g2 = re.sub(r"versionCode\s*=\s*[\d_]+", f"versionCode = {version_code}", g)
|
||||
g2 = re.sub(r'versionName\s*=\s*"[^"]+"', f'versionName = "{display}"', g2)
|
||||
if g2 != g:
|
||||
ANDROID_GRADLE.write_text(g2, encoding="utf-8")
|
||||
print("updated", ANDROID_GRADLE, "->", display, version_code)
|
||||
else:
|
||||
print("android gradle already in sync")
|
||||
|
||||
if INDEX_HTML.exists():
|
||||
h = INDEX_HTML.read_text(encoding="utf-8")
|
||||
h2 = re.sub(r'(id="badgeVer">)[^<]+', rf"\g<1>{ver}", h, count=1)
|
||||
if h2 != h:
|
||||
INDEX_HTML.write_text(h2, encoding="utf-8")
|
||||
print("updated", INDEX_HTML, "badge ->", ver)
|
||||
else:
|
||||
print("index.html badge already in sync")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user