Make it a bit clearer when people are running dev builds (#24457)

Release Notes:

- Include an indicator in About/CopySystemSpecs when running in debug mode
This commit is contained in:
Conrad Irwin 2025-02-07 09:57:37 -07:00 committed by GitHub
parent 144487bf1a
commit a6e15dda4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 3 deletions

View file

@ -64,12 +64,17 @@ impl Display for SystemSpecs {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let os_information = format!("OS: {} {}", self.os_name, self.os_version);
let app_version_information = format!(
"Zed: v{} ({})",
"Zed: v{} ({}) {}",
self.app_version,
match &self.commit_sha {
Some(commit_sha) => format!("{} {}", self.release_channel, commit_sha),
None => self.release_channel.to_string(),
}
},
if cfg!(debug_assertions) {
"(Taylor's Version)"
} else {
""
},
);
let system_specs = [
app_version_information,

View file

@ -881,7 +881,12 @@ fn about(
) {
let release_channel = ReleaseChannel::global(cx).display_name();
let version = env!("CARGO_PKG_VERSION");
let message = format!("{release_channel} {version}");
let debug = if cfg!(debug_assertions) {
"(debug)"
} else {
""
};
let message = format!("{release_channel} {version} {debug}");
let detail = AppCommitSha::try_global(cx).map(|sha| sha.0.clone());
let prompt = window.prompt(PromptLevel::Info, &message, detail.as_deref(), &["OK"], cx);