app version to server (#7130)

- Send app version and release stage to collab on connect
- Read the new header on the server

Release Notes:

- Added the ability to collaborate with users on different releases of
Zed.
This commit is contained in:
Conrad Irwin 2024-01-31 15:46:24 -07:00 committed by GitHub
parent 5b7b5bfea5
commit 2187513026
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 166 additions and 96 deletions

View file

@ -120,7 +120,7 @@ fn main() {
});
app.run(move |cx| {
ReleaseChannel::init(cx);
release_channel::init(env!("CARGO_PKG_VERSION"), cx);
if let Some(build_sha) = option_env!("ZED_COMMIT_SHA") {
AppCommitSha::set_global(AppCommitSha(build_sha.into()), cx);
}
@ -608,9 +608,13 @@ fn init_panic_hook(app: &App, installation_id: Option<String>, session_id: Strin
std::process::exit(-1);
}
let app_version = client::ZED_APP_VERSION
.or(app_metadata.app_version)
.map_or("dev".to_string(), |v| v.to_string());
let app_version = if let Some(version) = app_metadata.app_version {
version.to_string()
} else {
option_env!("CARGO_PKG_VERSION")
.unwrap_or("dev")
.to_string()
};
let backtrace = Backtrace::new();
let mut backtrace = backtrace
@ -639,7 +643,7 @@ fn init_panic_hook(app: &App, installation_id: Option<String>, session_id: Strin
file: location.file().into(),
line: location.line(),
}),
app_version: app_version.clone(),
app_version: app_version.to_string(),
release_channel: RELEASE_CHANNEL.display_name().into(),
os_name: app_metadata.os_name.into(),
os_version: app_metadata