From 1303c1f70aa5a953dee3e36cf180e9cf1cd8581c Mon Sep 17 00:00:00 2001 From: tnextday Date: Tue, 17 Dec 2019 18:36:10 +0800 Subject: [PATCH] update build script --- release/user-package.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release/user-package.sh b/release/user-package.sh index 57da957dd..35d3541f6 100755 --- a/release/user-package.sh +++ b/release/user-package.sh @@ -35,16 +35,16 @@ get_source() { build_v2() { pushd $SRCDIR - LDFLAGS="-X v2ray.com/core.codename=${CODENAME} -X v2ray.com/core.build=${BUILDNAME} -X v2ray.com/core.version=${VERSIONTAG}" + LDFLAGS="-s -w -X v2ray.com/core.codename=${CODENAME} -X v2ray.com/core.build=${BUILDNAME} -X v2ray.com/core.version=${VERSIONTAG}" echo ">>> Compile v2ray ..." - env CGO_ENABLED=0 go build -o $TMP/v2ray${EXESUFFIX} -ldflags "-s -w $LDFLAGS" ./main + env CGO_ENABLED=0 go build -o $TMP/v2ray${EXESUFFIX} -ldflags "$LDFLAGS" ./main if [[ $GOOS == "windows" ]];then - env CGO_ENABLED=0 go build -o $TMP/wv2ray${EXESUFFIX} -ldflags "-s -w -H windowsgui $LDFLAGS" ./main + env CGO_ENABLED=0 go build -o $TMP/wv2ray${EXESUFFIX} -ldflags "-H windowsgui $LDFLAGS" ./main fi echo ">>> Compile v2ctl ..." - env CGO_ENABLED=0 go build -o $TMP/v2ctl${EXESUFFIX} -tags confonly -ldflags "-s -w $LDFLAGS" ./infra/control/main + env CGO_ENABLED=0 go build -o $TMP/v2ctl${EXESUFFIX} -tags confonly -ldflags "$LDFLAGS" ./infra/control/main popd }