Use shortened SHA when displaying version to install (#31281)
This PR uses a shortened SHA when displaying the nightly version to install in the update status, for nicer tooltip formatting. Release Notes: - N/A
This commit is contained in:
parent
14d9a4189f
commit
3a1053bf0c
10 changed files with 78 additions and 35 deletions
|
@ -217,7 +217,7 @@ fn main() {
|
|||
|
||||
let app_version = AppVersion::load(env!("CARGO_PKG_VERSION"));
|
||||
let app_commit_sha =
|
||||
option_env!("ZED_COMMIT_SHA").map(|commit_sha| AppCommitSha(commit_sha.to_string()));
|
||||
option_env!("ZED_COMMIT_SHA").map(|commit_sha| AppCommitSha::new(commit_sha.to_string()));
|
||||
|
||||
if args.system_specs {
|
||||
let system_specs = feedback::system_specs::SystemSpecs::new_stateless(
|
||||
|
|
|
@ -65,7 +65,7 @@ pub fn init_panic_hook(
|
|||
Some(commit_sha) => format!(
|
||||
"https://github.com/zed-industries/zed/blob/{}/src/{}#L{} \
|
||||
(may not be uploaded, line may be incorrect if files modified)\n",
|
||||
commit_sha.0,
|
||||
commit_sha.full(),
|
||||
location.file(),
|
||||
location.line()
|
||||
),
|
||||
|
@ -114,7 +114,7 @@ pub fn init_panic_hook(
|
|||
line: location.line(),
|
||||
}),
|
||||
app_version: app_version.to_string(),
|
||||
app_commit_sha: app_commit_sha.as_ref().map(|sha| sha.0.clone()),
|
||||
app_commit_sha: app_commit_sha.as_ref().map(|sha| sha.full()),
|
||||
release_channel: RELEASE_CHANNEL.dev_name().into(),
|
||||
target: env!("TARGET").to_owned().into(),
|
||||
os_name: telemetry::os_name(),
|
||||
|
|
|
@ -940,7 +940,7 @@ fn about(
|
|||
""
|
||||
};
|
||||
let message = format!("{release_channel} {version} {debug}");
|
||||
let detail = AppCommitSha::try_global(cx).map(|sha| sha.0.clone());
|
||||
let detail = AppCommitSha::try_global(cx).map(|sha| sha.full());
|
||||
|
||||
let prompt = window.prompt(PromptLevel::Info, &message, detail.as_deref(), &["OK"], cx);
|
||||
cx.foreground_executor()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue