From 53d8c2ff6da51347158f3f7cf293b32b93872da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Wed, 29 Nov 2023 21:23:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=91=E5=B8=83=20v2.1.23?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- config/panel.go | 2 +- pkg/tools/tools.go | 4 ++-- scripts/install_panel.sh | 12 ++++++------ 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c9a59a0b24..453bfd41ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,7 +68,7 @@ fetch: - sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories - apk add --no-cache curl jq unzip zip script: - - curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel-frontend/releases" | jq -r '.[0].assets.links[] | select(.name | contains("dist")) | .direct_asset_url' | xargs curl -L -o frontend.zip + - curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel-frontend/releases" | jq -r '.[0].assets.links[] | select(.name | contains("dist")) | .direct_asset_url' | xargs curl -L -o frontend.zip - rm -rf public - unzip frontend.zip - mv dist public diff --git a/config/panel.go b/config/panel.go index c018167466..ebfb5bf377 100644 --- a/config/panel.go +++ b/config/panel.go @@ -8,6 +8,6 @@ func init() { config := facades.Config() config.Add("panel", map[string]any{ "name": "耗子Linux面板", - "version": "v2.1.22", + "version": "v2.1.23", }) } diff --git a/pkg/tools/tools.go b/pkg/tools/tools.go index b0d9f14a68..f5a2ec1759 100644 --- a/pkg/tools/tools.go +++ b/pkg/tools/tools.go @@ -170,7 +170,7 @@ func GetLatestPanelVersion() (PanelInfo, error) { isChina := IsChina() if isChina { - output, err = Exec(`curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest"`) + output, err = Exec(`curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest"`) } else { output, err = Exec(`curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest"`) } @@ -289,7 +289,7 @@ func GetPanelVersion(version string) (PanelInfo, error) { } if isChina { - output, err = Exec(`curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/` + version + `"`) + output, err = Exec(`curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/` + version + `"`) } else { output, err = Exec(`curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/tags/` + version + `"`) } diff --git a/scripts/install_panel.sh b/scripts/install_panel.sh index 3c1884e126..b5ac294305 100644 --- a/scripts/install_panel.sh +++ b/scripts/install_panel.sh @@ -182,16 +182,16 @@ Init_Panel() { # 下载面板zip包并解压 if [ "${ARCH}" == "x86_64" ]; then if ${inChina}; then - panelZip=$(curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("amd64v2")) | .direct_asset_url') - panelZipName=$(curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("amd64v2")) | .name') + panelZip=$(curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("amd64v2")) | .direct_asset_url') + panelZipName=$(curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("amd64v2")) | .name') else panelZip=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("amd64v2")) | .browser_download_url') panelZipName=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("amd64v2")) | .name') fi elif [ "${ARCH}" == "aarch64" ]; then if ${inChina}; then - panelZip=$(curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("arm64")) | .direct_asset_url') - panelZipName=$(curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("arm64")) | .name') + panelZip=$(curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("arm64")) | .direct_asset_url') + panelZipName=$(curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("arm64")) | .name') else panelZip=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("arm64")) | .browser_download_url') panelZipName=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("arm64")) | .name') @@ -210,8 +210,8 @@ Init_Panel() { # 下载 checksums 文件 if ${inChina}; then - checksumsFile=$(curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("checksums")) | .direct_asset_url') - checksumsFileName=$(curl -sSL "https://git.haozi.net/api/v4/projects/haozi-team%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("checksums")) | .name') + checksumsFile=$(curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("checksums")) | .direct_asset_url') + checksumsFileName=$(curl -sSL "https://git.haozi.net/api/v4/projects/opensource%2Fpanel/releases/permalink/latest" | jq -r '.assets.links[] | select(.name | contains("checksums")) | .name') else checksumsFile=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("checksums")) | .browser_download_url') checksumsFileName=$(curl -sSL "https://api.github.com/repos/haozi-team/panel/releases/latest" | jq -r '.assets[] | select(.name | contains("checksums")) | .name')