From 675962ce3cce893f08a9374cdaaa385c820f8a45 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Thu, 3 Jun 2021 11:54:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=B8=8B=E8=BD=BDc?= =?UTF-8?q?ore=E8=8E=B7=E5=8F=96tag=E6=97=B6=E6=9B=B4=E6=8D=A2=E4=B8=BAgit?= =?UTF-8?q?hub=20api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index e8ef5cd..6b42195 100644 --- a/install.sh +++ b/install.sh @@ -895,7 +895,8 @@ installV2Ray() { if [[ "${coreInstallType}" != "2" && "${coreInstallType}" != "3" ]]; then if [[ "${selectCoreType}" == "2" ]]; then - version=$(curl -s https://github.com/v2fly/v2ray-core/releases | grep /v2ray-core/releases/tag/ | head -1 | awk -F "[/]" '{print $6}' | awk -F "[>]" '{print $2}' | awk -F "[<]" '{print $1}') + + version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[].tag_name|head -1) else version=${v2rayCoreVersion} fi @@ -933,7 +934,8 @@ installXray() { echoContent skyBlue "\n进度 $1/${totalProgress} : 安装Xray" if [[ "${coreInstallType}" != "1" ]]; then - version=$(curl -s https://github.com/XTLS/Xray-core/releases | grep /XTLS/Xray-core/releases/tag/ | grep "Xray-core v" | head -1 | awk '{print $3}' | awk -F "[<]" '{print $1}') + + version=$(curl -s https://api.github.com/repos/XTLS/Xray-core/releases | jq -r .[].tag_name|head -1) echoContent green " ---> Xray-core版本:${version}" if wget --help | grep -q show-progress; then @@ -960,7 +962,8 @@ installTrojanGo() { echoContent skyBlue "\n进度 $1/${totalProgress} : 安装Trojan-Go" if ! ls /etc/v2ray-agent/trojan/ | grep -q trojan-go; then - version=$(curl -s https://github.com/p4gefau1t/trojan-go/releases | grep /trojan-go/releases/tag/ | head -1 | awk -F "[/]" '{print $6}' | awk -F "[>]" '{print $2}' | awk -F "[<]" '{print $1}') + + version=$(curl -s https://api.github.com/repos/p4gefau1t/trojan-go/releases | jq -r .[].tag_name|head -1) echoContent green " ---> Trojan-Go版本:${version}" if wget --help | grep -q show-progress; then wget -c -q --show-progress -P /etc/v2ray-agent/trojan/ "https://github.com/p4gefau1t/trojan-go/releases/download/${version}/${trojanGoCPUVendor}.zip" @@ -3751,7 +3754,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.4.33" + echoContent green "当前版本:v2.4.34" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus