Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/zed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ workspace.workspace = true
zed_actions.workspace = true
zeta.workspace = true
title_bar.workspace = true
zedless.workspace = true
zedless_settings.workspace = true
zlog.workspace = true
zlog_settings.workspace = true
Expand Down
13 changes: 9 additions & 4 deletions crates/zed/src/zed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,24 +947,29 @@ fn about(
) {
let release_channel = ReleaseChannel::global(cx).display_name();
let version = env!("CARGO_PKG_VERSION");
let zedless_version = zedless::ZEDLESS_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.full());
let message = format!("{release_channel} {zedless_version} {debug}");
let detail = if let Some(commit_hash) = AppCommitSha::try_global(cx).map(|sha| sha.full()) {
format!("{commit_hash}\n\nBased on Zed {version}")
} else {
format!("Based on Zed {version}")
};

let prompt = window.prompt(
PromptLevel::Info,
&message,
detail.as_deref(),
Some(&detail),
&["Copy", "OK"],
cx,
);
cx.spawn(async move |_, cx| {
if let Ok(0) = prompt.await {
let content = format!("{}\n{}", message, detail.as_deref().unwrap_or(""));
let content = format!("{}\n{}", message, detail);
cx.update(|cx| {
cx.write_to_clipboard(gpui::ClipboardItem::new_string(content));
})
Expand Down
2 changes: 1 addition & 1 deletion crates/zedless/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zedless"
version = "0.1.0"
version = "1.0.0"
edition.workspace = true
publish.workspace = true
license = "GPL-3.0-or-later"
Expand Down
2 changes: 2 additions & 0 deletions crates/zedless/src/zedless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ impl From<anyhow::Error> for SilentError {
SilentError::Error { error: err }
}
}

pub const ZEDLESS_VERSION: &'static str = env!("CARGO_PKG_VERSION");
4 changes: 2 additions & 2 deletions nix/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ let
gpu-lib = if withGLES then libglvnd else vulkan-loader;

# Cargo.toml located in repo root does not contain any version information.
cargoToml = fromTOML (readFile ../crates/zed/Cargo.toml);
pname = "zedless";
cargoToml = fromTOML (readFile ../crates/zedless/Cargo.toml);
pname = cargoToml.package.name;
version = cargoToml.package.version;
src = toSource {
root = ../.;
Expand Down