Add build SHA to panic reports and zed --version (on nightly/dev) (#24258)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan
2025-02-06 02:09:24 -07:00
committed by GitHub
parent f08b1d78ec
commit 69e6910c9c
8 changed files with 76 additions and 33 deletions
+5 -1
View File
@@ -339,13 +339,17 @@ mod linux {
impl InstalledApp for App {
fn zed_version_string(&self) -> String {
format!(
"Zed {}{} – {}",
"Zed {}{}{} – {}",
if *RELEASE_CHANNEL == "stable" {
"".to_string()
} else {
format!("{} ", *RELEASE_CHANNEL)
},
option_env!("RELEASE_VERSION").unwrap_or_default(),
match option_env!("ZED_COMMIT_SHA") {
Some(commit_sha) => format!(" {commit_sha} "),
None => "".to_string(),
},
self.0.display(),
)
}