Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

feat(desktop): a build can install a named runtime release

Salman Qureshi3c5f1b83b251
diff --git a/apps/desktop/src-tauri/src/commands/installer.rs b/apps/desktop/src-tauri/src/commands/installer.rs
index f860714f..54667703 100644
--- a/apps/desktop/src-tauri/src/commands/installer.rs
+++ b/apps/desktop/src-tauri/src/commands/installer.rs
@@ -89,8 +89,16 @@ fn client() -> Result<reqwest::Client, String> {
.map_err(|e| e.to_string())
}
+/// A build made for testers installs one named release instead of the
+/// latest stable one: `MERCURY_RUNTIME_TAG=mercury-dev-latest` at build time
+/// points it at the rolling dev pre-release.
+const PINNED_TAG: Option<&str> = option_env!("MERCURY_RUNTIME_TAG");
+
/// `/releases/latest` answers with a redirect to `/releases/tag/vX.Y.Z`.
async fn latest_tag() -> Result<String, String> {
+ if let Some(tag) = PINNED_TAG.map(str::trim).filter(|t| !t.is_empty()) {
+ return Ok(tag.to_string());
+ }
let no_redirect = reqwest::Client::builder()
.user_agent(USER_AGENT)
.redirect(reqwest::redirect::Policy::none())