Fix user-package codename & buildtime error (#303)

This commit is contained in:
Loyalsoldier 2020-10-12 09:41:27 +08:00 committed by GitHub
parent ff6bb51732
commit 7b8a0faee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ build_v2() {
local VERSIONTAG=$(git describe --abbrev=0 --tags)
fi
LDFLAGS="-s -w -buildid= -X v2ray.codename=${CODENAME} -X v2ray.build=${BUILDNAME} -X v2ray.version=${VERSIONTAG}"
LDFLAGS="-s -w -buildid= -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 "$LDFLAGS" ./main