Skip to content

VoiceStudio is the open-source, fully-local ElevenLabs alternative — voice cloning, voice design, video dubbing, dictation, transcription & audiobook creation in 646 languages.

test(release): keep version guards green on a beta version

velixiobf67de6eb463
diff --git a/docs/RELEASING.md b/docs/RELEASING.md
index b778a27d9..402642cc9 100644
--- a/docs/RELEASING.md
+++ b/docs/RELEASING.md
@@ -209,7 +209,9 @@ has no soak period, no side branch and no cherry-picks.
| Tauri sunset feeds | copied into the release | not copied |
Cutting a beta: with owner approval of the version, bump `package.json`,
-`pyproject.toml` and `_FALLBACK_VERSION` to `X.Y.Z-beta.N` together, add a
+`pyproject.toml` and `_FALLBACK_VERSION` to `X.Y.Z-beta.N` together, run `uv lock`
+(it records the PEP 440 form `X.Y.ZbN`; the lockstep test compares versions, not
+strings), add a
`## [X.Y.Z-beta.N]` section to `CHANGELOG.md`, tag from `main`, then run
`electron-release.yml` with `publish`. The workflow derives the channel from
the version (`prepare_electron_release.py --print-channel`), stamps it into every
diff --git a/tests/test_electron_transition.py b/tests/test_electron_transition.py
index 9d1cd79ba..4324bedd9 100644
--- a/tests/test_electron_transition.py
+++ b/tests/test_electron_transition.py
@@ -47,13 +47,17 @@ def test_snap_store_workflow_builds_strict_snap_and_uploads_only_tags_to_candida
tag_guard = next(s for s in package["steps"] if s.get("name") == "Match the tag to the app version")
assert '"v$version"' in tag_guard["run"]
import os
+ import re
import subprocess
import json
version = json.loads((ROOT / "package.json").read_text())["version"]
+ # A beta package version (X.Y.Z-beta.N) is never a Snap release: the job is
+ # skipped for beta tags and this guard rejects them if it ever runs.
+ is_final = re.fullmatch(r"\d+\.\d+\.\d+", version) is not None
for tag, error in [
- (f"v{version}", None),
+ (f"v{version}", None if is_final else "is not a final"),
(f"v{version}-rc.1", "is not a final"),
("v0.5", "is not a final"),
("v999.0.0", "does not match package.json"),
diff --git a/tests/test_voicestudio_branding.py b/tests/test_voicestudio_branding.py
index 436dd020b..eb5561e61 100644
--- a/tests/test_voicestudio_branding.py
+++ b/tests/test_voicestudio_branding.py
@@ -6,6 +6,8 @@ import json
import re
from pathlib import Path
+from packaging.version import Version
+
ROOT = Path(__file__).resolve().parents[1]
CURRENT_VERSION = json.loads((ROOT / "package.json").read_text())["version"]
@@ -26,7 +28,8 @@ def test_current_version_is_in_lockstep_everywhere() -> None:
lock_contracts = {"uv.lock": r'name = "omnivoice"\s+version = "([^"]+)"'}
for path, pattern in lock_contracts.items():
match = re.search(pattern, (ROOT / path).read_text())
- assert match and match.group(1) == CURRENT_VERSION, path
+ # uv writes the PEP 440 form of a beta (0.5.9b1 for 0.5.9-beta.1).
+ assert match and Version(match.group(1)) == Version(CURRENT_VERSION), path
def test_visible_brand_surfaces_say_voicestudio() -> None: