From 808a0626c0d45db67f069df8e173299dac8a48ea Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 7 Dec 2023 16:49:27 -0800 Subject: [PATCH 1/2] Show a notification on auto-update check action if updates are disabled --- crates/auto_update2/src/auto_update.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/crates/auto_update2/src/auto_update.rs b/crates/auto_update2/src/auto_update.rs index 72dbe32b5a..dbccd269b7 100644 --- a/crates/auto_update2/src/auto_update.rs +++ b/crates/auto_update2/src/auto_update.rs @@ -85,15 +85,7 @@ pub fn init(http_client: Arc, server_url: String, cx: &mut AppCo AutoUpdateSetting::register(cx); cx.observe_new_views(|workspace: &mut Workspace, _cx| { - workspace - .register_action(|_, action: &Check, cx| check(action, cx)) - .register_action(|_, _action: &CheckThatAutoUpdaterWorks, cx| { - let prompt = cx.prompt(gpui::PromptLevel::Info, "It does!", &["Ok"]); - cx.spawn(|_, _cx| async move { - prompt.await.ok(); - }) - .detach(); - }); + workspace.register_action(|_, action: &Check, cx| check(action, cx)); // @nate - code to trigger update notification on launch // workspace.show_notification(0, _cx, |cx| { @@ -130,9 +122,15 @@ pub fn init(http_client: Arc, server_url: String, cx: &mut AppCo } } -pub fn check(_: &Check, cx: &mut AppContext) { +pub fn check(_: &Check, cx: &mut ViewContext) { if let Some(updater) = AutoUpdater::get(cx) { updater.update(cx, |updater, cx| updater.poll(cx)); + } else { + drop(cx.prompt( + gpui::PromptLevel::Info, + "Auto-updates disabled for non-bundled app.", + &["Ok"], + )); } } From f9d569f1b83529f1bd0801c7e57de2c57b127241 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Thu, 7 Dec 2023 16:51:53 -0800 Subject: [PATCH 2/2] Remove '-nightly' suffix from nightly build version number It breaks our semver parsing, and the release channel is already 'nightly'. --- .github/workflows/release_nightly.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml index 0e0fd18e25..38552646c3 100644 --- a/.github/workflows/release_nightly.yml +++ b/.github/workflows/release_nightly.yml @@ -81,12 +81,11 @@ jobs: - name: Limit target directory size run: script/clear-target-dir-if-larger-than 100 - - name: Set release channel to nightly, add nightly prefix to the final version + - name: Set release channel to nightly run: | set -eu version=$(git rev-parse --short HEAD) echo "Publishing version: ${version} on release channel nightly" - sed -i '' "s/version = \"\(.*\)\"/version = \"\1-nightly\"/" crates/zed2/Cargo.toml echo "nightly" > crates/zed/RELEASE_CHANNEL - name: Generate license file