mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Build: remove the invalid quote character ' for flag -ldflags
It isn't valid to start with quote character ' for flag -ldflags. Go cmd older than 1.19 just ignores the error. Starting from go 1.19, Go cmd will fail with error message something like below, ``` stderr: invalid value "'-X=go.etcd.io/etcd/api/v3/version.GitSHA=01250c9'" for flag -ldflags: parameter may not start with quote character ' ``` Actually we don't have such quote character ' when building etcd/etcdctl/etcdutl. Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
cdf4228673
commit
536743042b
@ -93,7 +93,7 @@ tools_build() {
|
||||
# shellcheck disable=SC2086
|
||||
run env GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" CGO_ENABLED=0 go build ${GO_BUILD_FLAGS} \
|
||||
-installsuffix=cgo \
|
||||
"-ldflags='${GO_LDFLAGS[*]}'" \
|
||||
"-ldflags=${GO_LDFLAGS[*]}" \
|
||||
-o="${out}/${tool}" "./${tool}" || return 2
|
||||
done
|
||||
tests_build "${@}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user