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.

fix(release): let a beta AppImage pass the update-info contract

velixio31c641423eb6
diff --git a/electron/tests/update-package-contract.mjs b/electron/tests/update-package-contract.mjs
index 5d55f05d7..42c27042f 100644
--- a/electron/tests/update-package-contract.mjs
+++ b/electron/tests/update-package-contract.mjs
@@ -129,10 +129,13 @@ if (platform === 'win32') {
const updateInfo = execFileSync(artifactPath, ['--appimage-updateinformation'], {
encoding: 'utf8',
}).trim();
+ // Stable images follow the latest stable release. A beta image is pinned to its
+ // own tag: `latest` skips prereleases and could roll it back to an older stable.
+ const updateRelease = channel.startsWith('electron-beta-') ? `v${version}` : 'latest';
assert.equal(
updateInfo,
- 'gh-releases-zsync|debpalash|VoiceStudio|latest|VoiceStudio-Electron-*-linux-x64.AppImage.zsync',
- 'External AppImage updaters follow the stable Linux release feed',
+ `gh-releases-zsync|debpalash|VoiceStudio|${updateRelease}|VoiceStudio-Electron-*-linux-x64.AppImage.zsync`,
+ 'External AppImage updaters follow the channel their image was built for',
);
const control = `${artifactPath}.zsync`;
assert(existsSync(control), 'Versioned AppImage zsync control file exists');
diff --git a/tests/test_beta_release_channel.py b/tests/test_beta_release_channel.py
index c66af6718..a1be3e6c3 100644
--- a/tests/test_beta_release_channel.py
+++ b/tests/test_beta_release_channel.py
@@ -136,3 +136,14 @@ def test_every_electron_channel_regex_accepts_beta():
assert "electron-beta-linux-x64" in (
ROOT / "electron" / "scripts" / "embed-appimage-update.mjs"
).read_text(encoding="utf-8")
+
+
+def test_appimage_update_info_contract_matches_the_embed_script():
+ """v0.5.7-beta.1 failed Linux packaging: the embed script pinned a beta image to
+ its tag while the post-build contract still demanded `latest`. Both must key
+ the release field off the channel in the same way."""
+ embed = (ROOT / "electron/scripts/embed-appimage-update.mjs").read_text(encoding="utf-8")
+ contract = (ROOT / "electron/tests/update-package-contract.mjs").read_text(encoding="utf-8")
+ assert "isBeta ? releaseTag : 'latest'" in embed
+ assert "channel.startsWith('electron-beta-') ? `v${version}` : 'latest'" in contract
+ assert "|latest|VoiceStudio-Electron" not in contract, "contract must not hardcode latest"