build: cancel static link for darwin
This commit is contained in:
parent
e6ecf1fa30
commit
91fc8df84e
16
build.sh
16
build.sh
@ -60,11 +60,21 @@ BUILD() {
|
|||||||
-X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \
|
-X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \
|
||||||
-X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \
|
-X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \
|
||||||
"
|
"
|
||||||
|
ldflagsDarwin="\
|
||||||
|
-w -s \
|
||||||
|
-X 'github.com/Xhofe/alist/conf.BuiltAt=$builtAt' \
|
||||||
|
-X 'github.com/Xhofe/alist/conf.GoVersion=$goVersion' \
|
||||||
|
-X 'github.com/Xhofe/alist/conf.GitAuthor=$gitAuthor' \
|
||||||
|
-X 'github.com/Xhofe/alist/conf.GitCommit=$gitCommit' \
|
||||||
|
-X 'github.com/Xhofe/alist/conf.GitTag=$gitTag' \
|
||||||
|
-X 'github.com/Xhofe/alist/conf.WebTag=$webTag' \
|
||||||
|
"
|
||||||
if [ "$1" == "release" ]; then
|
if [ "$1" == "release" ]; then
|
||||||
xgo -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
xgo -targets=linux/*,windows/* -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
||||||
|
xgo -targets=darwin/* -out "$appName" -ldflags="$ldflagsDarwin" -tags=jsoniter .
|
||||||
else
|
else
|
||||||
xgo -targets=linux/amd64,windows/amd64,darwin/amd64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
xgo -targets=linux/amd64,windows/amd64 -out "$appName" -ldflags="$ldflags" -tags=jsoniter .
|
||||||
|
xgo -targets=darwin/amd64 -out "$appName" -ldflags="$ldflagsDarwin" -tags=jsoniter .
|
||||||
fi
|
fi
|
||||||
mkdir -p "build"
|
mkdir -p "build"
|
||||||
mv alist-* build
|
mv alist-* build
|
||||||
|
Loading…
x
Reference in New Issue
Block a user