zed/script/bundle-linux

114 lines
3.1 KiB
Plaintext
Raw Normal View History

Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
#!/usr/bin/env bash
set -euxo pipefail
# Function for displaying help info
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
help_info() {
echo "
Usage: ${0##*/} [options]
Build a release .tar.gz for Linux.
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
Options:
-h Display this help and exit.
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
"
}
while getopts 'h' flag
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
do
case "${flag}" in
h)
help_info
exit 0
;;
esac
done
export ZED_BUNDLE=true
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
channel=$(<crates/zed/RELEASE_CHANNEL)
version="$(script/get-crate-version zed)"
# Set RELEASE_VERSION so it's compiled into GPUI and it knows about the version.
export RELEASE_VERSION="${version}"
commit=$(git rev-parse HEAD | cut -c 1-7)
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
version_info=$(rustc --version --verbose)
host_line=$(echo "$version_info" | grep host)
target_triple=${host_line#*: }
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
# 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
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
# Strip the binary of all debug symbols
# Later, we probably want to do something like this: https://github.com/GabrielMajeri/separate-symbols
strip --strip-debug "target/${target_triple}/release/zed"
strip --strip-debug "target/${target_triple}/release/cli"
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
suffix=""
if [ "$channel" != "stable" ]; then
suffix="-$channel"
fi
# Move everything that should end up in the final package
# into a temp directory.
temp_dir=$(mktemp -d)
zed_dir="${temp_dir}/zed$suffix.app"
# Binary
mkdir -p "${zed_dir}/bin" "${zed_dir}/libexec"
cp "target/${target_triple}/release/zed" "${zed_dir}/libexec/zed-editor"
cp "target/${target_triple}/release/cli" "${zed_dir}/bin/zed"
# Libs
find_libs() {
ldd target/${target_triple}/release/zed |\
cut -d' ' -f3 |\
grep -v '\<\(libstdc++.so\|libc.so\|libgcc_s.so\|libm.so\|libpthread.so\|libdl.so\)'
}
mkdir -p "${zed_dir}/lib"
rm -rf "${zed_dir}/lib/*"
cp $(find_libs) "${zed_dir}/lib"
# Icons
mkdir -p "${zed_dir}/share/icons/hicolor/512x512/apps"
cp "crates/zed/resources/app-icon$suffix.png" "${zed_dir}/share/icons/hicolor/512x512/apps/zed.png"
mkdir -p "${zed_dir}/share/icons/hicolor/1024x1024/apps"
2024-05-01 19:22:44 +03:00
cp "crates/zed/resources/app-icon$suffix@2x.png" "${zed_dir}/share/icons/hicolor/1024x1024/apps/zed.png"
# .desktop
2024-05-28 04:01:20 +03:00
export DO_STARTUP_NOTIFY="true"
export APP_CLI="zed"
2024-05-28 04:01:20 +03:00
export APP_ICON="zed"
if [[ "$channel" == "preview" ]]; then
2024-05-28 04:01:20 +03:00
export APP_NAME="Zed Preview"
elif [[ "$channel" == "nightly" ]]; then
2024-05-28 04:01:20 +03:00
export APP_NAME="Zed Nightly"
elif [[ "$channel" == "dev" ]]; then
export APP_NAME="Zed Devel"
else
export APP_NAME="Zed"
fi
2024-05-28 04:01:20 +03:00
mkdir -p "${zed_dir}/share/applications"
envsubst < "crates/zed/resources/zed.desktop.in" > "${zed_dir}/share/applications/zed$suffix.desktop"
# Licenses
script/generate-licenses
cp "assets/licenses.md" "${zed_dir}/licenses.md"
# Create archive out of everything that's in the temp directory
target="linux-$(uname -m)"
if [[ "$channel" == "dev" ]]; then
archive="zed-${commit}-${target}.tar.gz"
else
archive="zed-${target}.tar.gz"
Initial Linux nightly bundles upload (#8913) Changes Zed CI to build and upload Linux nightly bundles. * `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based workflows more convenient * renames `run-build-dmg` label into `run-bundling`, also renames a few GH Actions entries to be more generic * make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact. * adds a `*.deb` package building with a couple of caveats, marked with new `TODO linux` entries: 1. `cargo-bundle` is not very flexible, so it generates artifacts with the structure and names that we're unable to alter before/during the generation. For that, a set of extra steps is made by repacking the *.deb package — this is not very portable between different Linux distros, so later one needs to find a way to combine multiple package types in this script. 2. `cargo-bundle` is not able to properly generate the *.msi bundle despite declaring it in the features: https://github.com/burtonageo/cargo-bundle/issues/116 Windows needs to invent its own way of bundling or fix the tool. 3. Both `cli` and `zed` binaries are added into the archive under `/usr/local/bin/` path with their `-$channel` suffix (-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed -> /usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed launcher: ``` ~/work/zed kb/linux-nightly:origin/kb/linux-nightly*​ ❯ dpkg -c target/zed_amd64.deb drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/ -rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly -rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/ -rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/ -rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/ drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/ -rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly ``` But the CLI does not work under Linux yet and there's no way to install that CLI from Zed now; Zed binary itself is not able to open `file/location:12:34`-like things and set up the env properly, but is able to start or open a directory. So, this structure can be considered temporary and changed, if needed. 4. Zed Nightly on Linux does not know how to update itself, so all nightly publishing is not picked up automatically. 5. Rust cache from `main` builds does not get shared between CI jobs, due to being run in a different CI job that forms a different CI key, so ``` - name: Cache dependencies uses: swatinem/rust-cache@v2 with: save-if: ${{ false }} ``` would not work. This makes Linux bundling jobs long. Release Notes: - N/A
2024-03-08 00:22:53 +03:00
fi
rm -rf "${archive}"
2024-05-28 04:01:20 +03:00
remove_match="zed(-[a-zA-Z0-9]+)?-linux-$(uname -m)\.tar\.gz"
ls target/release | grep -E ${remove_match} | xargs -d "\n" -I {} rm -f target/release/{} || true
tar -czvf target/release/$archive -C ${temp_dir} "zed$suffix.app"