feat(脚本): v2ray安装、更新是不再查询prerelease
parent
500d55b10f
commit
b249e844d1
12
install.sh
12
install.sh
|
@ -1196,7 +1196,7 @@ installV2Ray() {
|
|||
if [[ "${coreInstallType}" != "2" && "${coreInstallType}" != "3" ]]; then
|
||||
if [[ "${selectCoreType}" == "2" ]]; then
|
||||
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[].tag_name | head -1)
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r '.[]|select (.prerelease==false)|.tag_name' | head -1)
|
||||
else
|
||||
version=${v2rayCoreVersion}
|
||||
fi
|
||||
|
@ -1280,11 +1280,11 @@ v2rayVersionManageMenu() {
|
|||
echoContent yellow "2.不保证回退后一定可以正常使用"
|
||||
echoContent yellow "3.如果回退的版本不支持当前的config,则会无法连接,谨慎操作"
|
||||
echoContent skyBlue "------------------------Version-------------------------------"
|
||||
curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[].tag_name | head -5 | awk '{print ""NR""":"$0}'
|
||||
curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r '.[]|select (.prerelease==false)|.tag_name' | head -5 | awk '{print ""NR""":"$0}'
|
||||
|
||||
echoContent skyBlue "--------------------------------------------------------------"
|
||||
read -r -p "请输入要回退的版本:" selectV2rayVersionType
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[].tag_name | head -5 | awk '{print ""NR""":"$0}' | grep "${selectV2rayVersionType}:" | awk -F "[:]" '{print $2}')
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r '.[]|select (.prerelease==false)|.tag_name' | head -5 | awk '{print ""NR""":"$0}' | grep "${selectV2rayVersionType}:" | awk -F "[:]" '{print $2}')
|
||||
if [[ -n "${version}" ]]; then
|
||||
updateV2Ray "${version}"
|
||||
else
|
||||
|
@ -1350,7 +1350,7 @@ updateV2Ray() {
|
|||
if [[ -n "$1" ]]; then
|
||||
version=$1
|
||||
else
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[0].tag_name)
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r '.[0]|select (.prerelease==false)|.tag_name')
|
||||
fi
|
||||
# 使用锁定的版本
|
||||
if [[ -n "${v2rayCoreVersion}" ]]; then
|
||||
|
@ -1374,7 +1374,7 @@ updateV2Ray() {
|
|||
if [[ -n "$1" ]]; then
|
||||
version=$1
|
||||
else
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[0].tag_name)
|
||||
version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r '.[0]|select (.prerelease==false)|.tag_name')
|
||||
fi
|
||||
|
||||
if [[ -n "${v2rayCoreVersion}" ]]; then
|
||||
|
@ -4254,7 +4254,7 @@ menu() {
|
|||
cd "$HOME" || exit
|
||||
echoContent red "\n=============================================================="
|
||||
echoContent green "作者:mack-a"
|
||||
echoContent green "当前版本:v2.5.46"
|
||||
echoContent green "当前版本:v2.5.47"
|
||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||
echoContent green "描述:八合一共存脚本\c"
|
||||
showInstallStatus
|
||||
|
|
Loading…
Reference in New Issue