remote: Upload bundled remote server binary to hosts without one
This commit is contained in:
1 parent
baf7acb0bc
commit
2abcfff462
2 files changed
+16
No files matched your search
@@ -274,6 +274,21 @@ async fn build_remote_server_from_source(
|
||||
log::warn!("ZED_BUILD_REMOTE_SERVER is disabled, but no server binary exists on the server")
|
||||
}
|
||||
|
||||
// Bundles ship a prebuilt remote server next to the editor binary so installs without a
|
||||
// zed checkout can still provision remote hosts. The .gz suffix makes the remote-side
|
||||
// extract step gunzip it.
|
||||
let bundled_remote_server = std::env::current_exe()
|
||||
.ok()
|
||||
.and_then(|exe| exe.parent().map(|dir| dir.join("zed-remote-server.gz")))
|
||||
.filter(|path| path.is_file());
|
||||
if let Some(bundled_remote_server) = bundled_remote_server {
|
||||
if binary_exists_on_server {
|
||||
return Ok(None);
|
||||
}
|
||||
log::info!("uploading bundled remote server binary");
|
||||
return Ok(Some(bundled_remote_server));
|
||||
}
|
||||
|
||||
async fn run_cmd(command: &mut Command) -> Result<()> {
|
||||
let output = command
|
||||
.kill_on_drop(true)
|
||||
|
||||
@@ -151,6 +151,7 @@ zed_dir="${temp_dir}/zed$suffix.app"
|
||||
mkdir -p "${zed_dir}/bin" "${zed_dir}/libexec"
|
||||
cp "${target_dir}/${target_triple}/release/zed" "${zed_dir}/libexec/zed-editor"
|
||||
cp "${target_dir}/${target_triple}/release/cli" "${zed_dir}/bin/zed"
|
||||
gzip -c --best "${target_dir}/${remote_server_triple}/release/remote_server" > "${zed_dir}/libexec/zed-remote-server.gz"
|
||||
|
||||
# Libs
|
||||
# Bundle libstdc++ so older supported systems can run binaries built with our
|
||||
|
||||
Reference in new issue
Block a user