Add (flatpak) and (snap) suffixes to Zed version in system info (#32903)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-06-17 14:39:35 -06:00 committed by GitHub
parent 051fa06c7c
commit a422345224
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 54 additions and 10 deletions

View file

@ -10,17 +10,36 @@ Usage: ${0##*/} [options]
Build a release .tar.gz for Linux.
Options:
-h Display this help and exit.
-h, --help Display this help and exit.
--flatpak Set ZED_BUNDLE_TYPE=flatpak so that this can be included in system info
"
}
while getopts 'h' flag
do
case "${flag}" in
h)
help_info
exit 0
;;
# Parse all arguments manually
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
help_info
exit 0
;;
--flatpak)
export ZED_BUNDLE_TYPE=flatpak
shift
;;
--)
shift
break
;;
-*)
echo "Unknown option: $1" >&2
help_info
exit 1
;;
*)
echo "Error: Unexpected argument: $1" >&2
help_info
exit 1
;;
esac
done

View file

@ -4,7 +4,7 @@ set -euo pipefail
cd "$(dirname "$0")/../.."
shopt -s extglob
script/bundle-linux
script/bundle-linux --flatpak
archive_match="zed(-[a-zA-Z0-9]+)?-linux-$(uname -m)\.tar\.gz"
archive=$(ls "target/release" | grep -E ${archive_match})
channel=$(<crates/zed/RELEASE_CHANNEL)