From e4c096295fb5822a4fc3e815f2a784fbc95254be Mon Sep 17 00:00:00 2001 From: wanghe-fit2cloud Date: Thu, 6 Mar 2025 15:22:44 +0800 Subject: [PATCH] feat: Optimize the packaging process --- .goreleaser.yaml | 10 +++++----- agent/cmd/server/conf/app.yaml | 4 ++-- ci/script.sh | 6 +++--- core/cmd/server/conf/app.yaml | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index f2fea0f97..a4605752a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -9,12 +9,11 @@ before: - chmod +x ./ci/script.sh - ./ci/script.sh - sed -i 's@ORIGINAL_VERSION=.*@ORIGINAL_VERSION=v{{ .Version }}@g' 1pctl - - cd ./core && go mod tidy - - cd ./agent && go mod tidy builds: - id: agent - main: ./agent/cmd/server/main.go + dir: agent + main: cmd/server/main.go binary: 1panel-agent flags: - -tags=xpack @@ -35,7 +34,8 @@ builds: - s390x - id: core - main: ./core/cmd/server/main.go + dir: core + main: cmd/server/main.go binary: 1panel-core flags: - -tags=xpack @@ -56,7 +56,7 @@ builds: - s390x archives: - - format: tar.gz + - formats: [ 'tar.gz' ] builds: - core - agent diff --git a/agent/cmd/server/conf/app.yaml b/agent/cmd/server/conf/app.yaml index 415e74763..0c57556fa 100644 --- a/agent/cmd/server/conf/app.yaml +++ b/agent/cmd/server/conf/app.yaml @@ -3,9 +3,9 @@ base: mode: dev remote_url: - repo_url: https://resource.fit2cloud.com/1panel/package - resource_url: https://resource.fit2cloud.com/1panel/resource app_repo: https://apps-assets.fit2cloud.com + repo_url: https://resource.fit2cloud.com/1panel/package/v2 + resource_url: https://resource.fit2cloud.com/1panel/resource/v2 log: level: debug diff --git a/ci/script.sh b/ci/script.sh index eae3a0f8d..c6e4d0c76 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -22,13 +22,13 @@ if [ ! -f "1panel-agent.service" ]; then fi if [ ! -f "GeoIP.mmdb" ]; then - wget https://resource.1panel.pro/geo/GeoIP.mmdb + wget https://resource.fit2cloud.com/1panel/package/v2/geo/GeoIP.mmdb fi if [ ! -f "lang.tar.gz" ]; then - wget https://resource.1panel.pro/language/lang.tar.gz + wget https://resource.fit2cloud.com/1panel/package/v2/language/lang.tar.gz tar zxvf lang.tar.gz rm -rf lang.tar.gz fi -chmod 755 1pctl install.sh \ No newline at end of file +chmod 755 1pctl install.sh diff --git a/core/cmd/server/conf/app.yaml b/core/cmd/server/conf/app.yaml index 776f6d46e..ec5b0d326 100644 --- a/core/cmd/server/conf/app.yaml +++ b/core/cmd/server/conf/app.yaml @@ -9,9 +9,9 @@ base: version: v2.0.0 remote_url: - repo_url: https://resource.fit2cloud.com/1panel/package app_repo: https://apps-assets.fit2cloud.com - resource_url: https://resource.fit2cloud.com/1panel/resource + repo_url: https://resource.fit2cloud.com/1panel/package/v2 + resource_url: https://resource.fit2cloud.com/1panel/resource/v2 log: level: debug