Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

linux: Fix missing licenses in binary causing panics (#14561)

Thorsten Ball66f0c390a88f
diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml
index 61f224ecb00..39cfa68bc23 100644
--- a/.github/workflows/release_nightly.yml
+++ b/.github/workflows/release_nightly.yml
@@ -121,9 +121,6 @@ jobs:
echo "Publishing version: ${version} on release channel nightly"
echo "nightly" > crates/zed/RELEASE_CHANNEL
- - name: Generate license file
- run: script/generate-licenses
-
- name: Create Linux .tar.gz bundle
run: script/bundle-linux
diff --git a/script/bundle-linux b/script/bundle-linux
index 711abf72fed..2fe4d8f51b8 100755
--- a/script/bundle-linux
+++ b/script/bundle-linux
@@ -38,6 +38,9 @@ version_info=$(rustc --version --verbose)
host_line=$(echo "$version_info" | grep host)
target_triple=${host_line#*: }
+# Generate the licenses first, so they can be baked into the binaries
+script/generate-licenses
+
# Build binary in release mode
export RUSTFLAGS="-C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"
cargo build --release --target "${target_triple}" --package zed --package cli
@@ -97,8 +100,7 @@ fi
mkdir -p "${zed_dir}/share/applications"
envsubst < "crates/zed/resources/zed.desktop.in" > "${zed_dir}/share/applications/zed$suffix.desktop"
-# Licenses
-script/generate-licenses
+# Copy generated licenses so they'll end up in archive too
cp "assets/licenses.md" "${zed_dir}/licenses.md"
# Create archive out of everything that's in the temp directory