Add script to package Linux binary into archive (#11165)

Release Notes:

- N/A
This commit is contained in:
Thorsten Ball 2024-04-30 14:56:48 +02:00 committed by GitHub
parent 73d0600ad2
commit d743c19fe2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 92 additions and 105 deletions

View file

@ -4,7 +4,7 @@
bash -euo pipefail
source script/lib/blob-store.sh
allowed_targets=("linux-deb" "macos")
allowed_targets=("linux-targz" "macos")
is_allowed_target() {
for val in "${allowed_targets[@]}"; do
if [[ "$1" == "$val" ]]; then
@ -40,11 +40,11 @@ case "$target" in
upload_to_blob_store $bucket_name "target/release/Zed.dmg" "nightly/Zed.dmg"
upload_to_blob_store $bucket_name "target/latest-sha" "nightly/latest-sha"
;;
linux-deb)
find target/release -type f -name "*.deb" -print0 | while IFS= read -r -d '' bundle_file; do
linux-targz)
find . -type f -name "zed-*.tar.gz" -print0 | while IFS= read -r -d '' bundle_file; do
upload_to_blob_store $bucket_name "$bundle_file" "nightly/$(basename "$bundle_file")"
done
upload_to_blob_store $bucket_name "target/latest-sha" "nightly/latest-sha-linux-deb"
upload_to_blob_store $bucket_name "target/latest-sha" "nightly/latest-sha-linux-targz"
;;
*)
echo "Error: Unknown target '$target'"