From 183a6f1b3a710d4876216c8af80818af3ce019eb Mon Sep 17 00:00:00 2001 From: Xhofe Date: Sat, 16 Apr 2022 16:55:55 +0800 Subject: [PATCH] build: static link for compile --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 54f66033..5faa3aac 100644 --- a/build.sh +++ b/build.sh @@ -52,7 +52,7 @@ BUILD() { webTag=$(wget -qO- -t1 -T2 "https://api.github.com/repos/alist-org/alist-web/releases/latest" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g') echo "build version: $gitTag" ldflags="\ --w -s \ +-w -s --extldflags '-static -fpic' \ -X 'github.com/Xhofe/alist/conf.BuiltAt=$builtAt' \ -X 'github.com/Xhofe/alist/conf.GoVersion=$goVersion' \ -X 'github.com/Xhofe/alist/conf.GitAuthor=$gitAuthor' \