From d83959569d6b80fafead161383c16d52e99ebb20 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Tue, 9 Oct 2018 10:54:02 +0200 Subject: [PATCH] prepend 'v' to version numbers --- release/install-release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release/install-release.sh b/release/install-release.sh index 96c576ca..6a2306e1 100755 --- a/release/install-release.sh +++ b/release/install-release.sh @@ -194,8 +194,14 @@ getVersion(){ VER=`/usr/bin/v2ray/v2ray -version 2>/dev/null` RETVAL="$?" CUR_VER=`echo $VER | head -n 1 | cut -d " " -f2 | cut -d. -f-2` + if [[ ${CUR_VER} != v* ]]; then + CUR_VER=v${CUR_VER} + fi TAG_URL="https://api.github.com/repos/v2ray/v2ray-core/releases/latest" NEW_VER=`curl ${PROXY} -s ${TAG_URL} --connect-timeout 10| grep 'tag_name' | cut -d\" -f4` + if [[ ${NEW_VER} != v* ]]; then + NEW_VER=v${NEW_VER} + fi if [[ $? -ne 0 ]] || [[ $NEW_VER == "" ]]; then colorEcho ${RED} "Failed to fetch release information. Please check your network or try again." return 3