Files
strata/strata_cli/__init__.py
T
Niko1221 6f8800aefe Version bump for 0.2.3: app 0.2.3, engine and Control 0.1.48
Cargo.toml and Cargo.lock, desktop and host package.json and lock, PRODUCT_VERSION, CMake project and Metal STRATA_VERSION, build_hip_linux PKGVER default, About comments, tests that pin the number, Docker image tags and docs (0.2.3-<flavor>), download names in the READMEs, AMD_HIP.md and UPDATES.md, AGENTS.md, the bug report placeholder. The engine moves too: it shares the CMake number and its source changed since 0.2.2 (DFlash2, verify and prefill paths). A new test checks every place agrees and that a 0.2.2 install (Control 0.1.47) is offered Control 0.1.48.
2026-10-22 23:33:15 +02:00

30 lines
1.0 KiB
Python

"""Terminal clients for the shared Strata server."""
import re
from pathlib import Path
SCHEMA_VERSION = 1
#: The version people are told: the Strata app's own (apps/desktop/src-tauri/Cargo.toml `version`; tests/terminal/test_tuiqa_version.py keeps the
#: two equal). `version()` below is the files' build number, which the engine-compatibility checks compare, so it stays numeric.
PRODUCT_VERSION = "0.2.3"
def version() -> str:
"""The terminal's version: the VERSION file of an archive, else the source tree's CMake project version."""
root = Path(__file__).resolve().parents[1]
try:
text = (root / "VERSION").read_text(encoding="utf-8").strip()
if text:
return text
except OSError:
pass
try:
m = re.search(r"^\s*project\([^)]*?VERSION\s+([0-9]+(?:\.[0-9]+)+)",
(root / "CMakeLists.txt").read_text(encoding="utf-8", errors="replace"), re.MULTILINE)
if m:
return m.group(1)
except OSError:
pass
return "unknown"