From 9ef830e9bbaa3c773f246031b5520c95e70dfdfc Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 29 Jan 2024 10:48:54 +0100 Subject: [PATCH] update: Add arch and os to release query parameters. (#6976) This is no-op right now, but we need it for multi-platform support and (potentially) to split the Universal Binary on mac into two non-universal targets. Related to: #6837 Release Notes: - N/A --- crates/auto_update/src/auto_update.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index 08e9e38dd508a99f9118d6aad8c03970e97ef6ad..5ce3316be83406b77cade1afa2f0f0fc333ab13f 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -18,7 +18,12 @@ use smol::io::AsyncReadExt; use settings::{Settings, SettingsStore}; use smol::{fs::File, process::Command}; -use std::{ffi::OsString, sync::Arc, time::Duration}; +use std::{ + env::consts::{ARCH, OS}, + ffi::OsString, + sync::Arc, + time::Duration, +}; use update_notification::UpdateNotification; use util::channel::{AppCommitSha, ReleaseChannel}; use util::http::HttpClient; @@ -249,7 +254,10 @@ impl AutoUpdater { ) })?; - let mut url_string = format!("{server_url}/api/releases/latest?asset=Zed.dmg"); + let mut url_string = format!( + "{server_url}/api/releases/latest?asset=Zed.dmg&os={}&arch={}", + OS, ARCH + ); cx.update(|cx| { if let Some(param) = cx .try_global::()