Fix "view release notes" on dev/nightly builds (#17967)
This commit is contained in:
parent
8cc6df573c
commit
bdca342cdc
1 changed files with 15 additions and 12 deletions
|
@ -244,19 +244,22 @@ pub fn view_release_notes(_: &ViewReleaseNotes, cx: &mut AppContext) -> Option<(
|
||||||
let auto_updater = AutoUpdater::get(cx)?;
|
let auto_updater = AutoUpdater::get(cx)?;
|
||||||
let release_channel = ReleaseChannel::try_global(cx)?;
|
let release_channel = ReleaseChannel::try_global(cx)?;
|
||||||
|
|
||||||
if matches!(
|
match release_channel {
|
||||||
release_channel,
|
ReleaseChannel::Stable | ReleaseChannel::Preview => {
|
||||||
ReleaseChannel::Stable | ReleaseChannel::Preview
|
let auto_updater = auto_updater.read(cx);
|
||||||
) {
|
let current_version = auto_updater.current_version;
|
||||||
let auto_updater = auto_updater.read(cx);
|
let release_channel = release_channel.dev_name();
|
||||||
let release_channel = release_channel.dev_name();
|
let path = format!("/releases/{release_channel}/{current_version}");
|
||||||
let current_version = auto_updater.current_version;
|
let url = &auto_updater.http_client.build_url(&path);
|
||||||
let url = &auto_updater
|
cx.open_url(url);
|
||||||
.http_client
|
}
|
||||||
.build_url(&format!("/releases/{release_channel}/{current_version}"));
|
ReleaseChannel::Nightly => {
|
||||||
cx.open_url(url);
|
cx.open_url("https://github.com/zed-industries/zed/commits/nightly/");
|
||||||
|
}
|
||||||
|
ReleaseChannel::Dev => {
|
||||||
|
cx.open_url("https://github.com/zed-industries/zed/commits/main/");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue