Add (flatpak)
and (snap)
suffixes to Zed version in system info (#32903)
Release Notes: - N/A
This commit is contained in:
parent
051fa06c7c
commit
a422345224
4 changed files with 54 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue