From 076e5e584b662d6ec2433935085a908637748288 Mon Sep 17 00:00:00 2001 From: EUForest Date: Wed, 7 Jan 2026 14:27:41 +0800 Subject: [PATCH] fix: use underscore in build time to avoid ldflags parsing error --- .github/workflows/deploy-linux.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-linux.yml b/.github/workflows/deploy-linux.yml index 3f797c5..5fc3bb7 100644 --- a/.github/workflows/deploy-linux.yml +++ b/.github/workflows/deploy-linux.yml @@ -42,9 +42,8 @@ jobs: fi echo "Building ppanel-server $VERSION" - BUILD_TIME=$(date +"%Y-%m-%d %H:%M:%S") - LDFLAGS="-w -s -X github.com/perfect-panel/server/pkg/constant.Version=$VERSION -X github.com/perfect-panel/server/pkg/constant.BuildTime=${BUILD_TIME}" - go build -ldflags "${LDFLAGS}" -o ppanel-server ./ppanel.go + BUILD_TIME=$(date +"%Y-%m-%d_%H:%M:%S") + go build -ldflags="-w -s -X github.com/perfect-panel/server/pkg/constant.Version=$VERSION -X github.com/perfect-panel/server/pkg/constant.BuildTime=$BUILD_TIME" -o ppanel-server ./ppanel.go tar -czf ppanel-server-${VERSION}-linux-amd64.tar.gz ppanel-server sha256sum ppanel-server ppanel-server-${VERSION}-linux-amd64.tar.gz > checksum.txt