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:
parent
524b2aca56
commit
bab1c33de3
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user