mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 13:40:55 +08:00
优化编译脚本
This commit is contained in:
@@ -20,7 +20,9 @@ go mod tidy
|
||||
|
||||
echo "start build"
|
||||
|
||||
ldflags="-s -w -extldflags '-static' -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$(date -Iseconds)"
|
||||
extldflags="-static"
|
||||
ldflags="-s -w -X main.appVer=$appVer -X main.commitId=$commitId -X main.buildDate=$(date -Iseconds) \
|
||||
-extldflags \"$extldflags\" "
|
||||
|
||||
go build -o anylink -trimpath -ldflags "$ldflags"
|
||||
|
||||
|
Reference in New Issue
Block a user