1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-02-01 14:17:59 -05:00

fix get the latest release tag error

https://github.com/v2ray/v2ray-core/issues/2373
This commit is contained in:
Kslr 2020-03-25 10:27:17 +08:00 committed by Kslr
parent 524b2aca56
commit bab1c33de3
No known key found for this signature in database
GPG Key ID: 0AF5F66FA1E887CE

View File

@ -255,7 +255,7 @@ getVersion(){
RETVAL=$?
CUR_VER="$(normalizeVersion "$(echo "$VER" | head -n 1 | cut -d " " -f2)")"
TAG_URL="https://api.github.com/repos/v2ray/v2ray-core/releases/latest"
NEW_VER="$(normalizeVersion "$(curl ${PROXY} -s "${TAG_URL}" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4)")"
NEW_VER="$(normalizeVersion "$(curl ${PROXY} -H "Accept: application/json" -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0" -s "${TAG_URL}" --connect-timeout 10| grep 'tag_name' | cut -d\" -f4)")"
if [[ $? -ne 0 ]] || [[ $NEW_VER == "" ]]; then
colorEcho ${RED} "Failed to fetch release information. Please check your network or try again."