From e291d9954a18413c99105def1a2d32e63e5715be Mon Sep 17 00:00:00 2001 From: Clementine Urquizar Date: Mon, 9 Dec 2019 14:48:08 +0100 Subject: [PATCH] Change regexp in install script to not take into acccount pre-releases --- download-latest.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/download-latest.sh b/download-latest.sh index fb6acb4af..a8fe4a1f5 100644 --- a/download-latest.sh +++ b/download-latest.sh @@ -1,12 +1,12 @@ #!/bin/sh # COLORS -RED="\033[31m" -GREEN="\033[32m" -DEFAULT="\033[0m" +RED='\033[31m' +GREEN='\033[32m' +DEFAULT='\033[0m' # GLOBALS -REGEXP_SEMVER='v[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z-]*\)' +GREP_SEMVER_REGEXP='\"v\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\"' # i.e. "v[number].[number].[number]" BINARY_NAME='meilisearch' # semverParseInto and semverLT from https://github.com/cloudflare/semver_bash/blob/master/semver.sh @@ -103,7 +103,7 @@ esac # GET LATEST VERSION tags=$(curl -s 'https://api.github.com/repos/meilisearch/MeiliSearch/tags' \ - | grep "$REGEXP_SEMVER" \ + | grep "$GREP_SEMVER_REGEXP" \ | grep 'name' \ | tr -d '"' | tr -d ',' | cut -d 'v' -f 2)