Skip to content

Commit

Permalink
remove cgo
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMengXinX committed Oct 30, 2022
1 parent 6d17e6b commit 18bd21a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ BUILD_TIME=$(date +'%Y-%m-%d %T')

LDFlags="\
-s -w \
-extldflags '-static -fpic' \
-X 'main._VersionName=${VERSION}' \
-X 'main.commitSHA=${COMMIT_SHA}' \
-X 'main.buildTime=${BUILD_TIME}' \
-X 'main.repoPath=XiaoMengXinX/Music163bot-Go'\
-X 'main.rawRepoPath=XiaoMengXinX/Music163bot-Go/v2'\
"

go build -trimpath -ldflags "${LDFlags}"
CGO_ENABLED=0 go build -trimpath -ldflags "${LDFlags}"

0 comments on commit 18bd21a

Please sign in to comment.