mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-27 07:14:26 +01:00
Merge #1054
1054: Make small improvements r=Kerollmops a=whoan Thanks for this great tool! Co-authored-by: Juan Eugenio Abadie <juaneabadie@gmail.com>
This commit is contained in:
commit
65c6e46775
@ -71,7 +71,7 @@ semverLT() {
|
|||||||
# Returns the tag of the latest stable release (in terms of semver and not of release date)
|
# Returns the tag of the latest stable release (in terms of semver and not of release date)
|
||||||
get_latest() {
|
get_latest() {
|
||||||
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
|
temp_file='temp_file' # temp_file needed because the grep would start before the download is over
|
||||||
curl -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file"
|
curl -s 'https://api.github.com/repos/meilisearch/MeiliSearch/releases' > "$temp_file" || return 1
|
||||||
releases=$(cat "$temp_file" | \
|
releases=$(cat "$temp_file" | \
|
||||||
grep -E "tag_name|draft|prerelease" \
|
grep -E "tag_name|draft|prerelease" \
|
||||||
| tr -d ',"' | cut -d ':' -f2 | tr -d ' ')
|
| tr -d ',"' | cut -d ':' -f2 | tr -d ' ')
|
||||||
@ -168,16 +168,17 @@ failure_usage() {
|
|||||||
|
|
||||||
# MAIN
|
# MAIN
|
||||||
latest="$(get_latest)"
|
latest="$(get_latest)"
|
||||||
get_os
|
|
||||||
if [ "$?" -eq 1 ]; then
|
if ! get_os; then
|
||||||
failure_usage
|
failure_usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
get_archi
|
|
||||||
if [ "$?" -eq 1 ]; then
|
if ! get_archi; then
|
||||||
failure_usage
|
failure_usage
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading MeiliSearch binary $latest for $os, architecture $archi..."
|
echo "Downloading MeiliSearch binary $latest for $os, architecture $archi..."
|
||||||
release_file="meilisearch-$os-$archi"
|
release_file="meilisearch-$os-$archi"
|
||||||
link="https://github.com/meilisearch/MeiliSearch/releases/download/$latest/$release_file"
|
link="https://github.com/meilisearch/MeiliSearch/releases/download/$latest/$release_file"
|
||||||
|
Loading…
Reference in New Issue
Block a user