build.sh: Adjust building etcdctl to be same as etcd binary

This fixes so that the ENV vars are taken in the same way as for etcd
binary.
This commit is contained in:
Lili Cosic 2021-04-19 17:48:23 +02:00
parent 81652d16ef
commit 51c28fc475

View File

@ -51,7 +51,7 @@ etcd_build() {
# shellcheck disable=SC2086
(
cd ./etcdctl
run env CGO_ENABLED=0 GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" go build $GO_BUILD_FLAGS \
run env GO_BUILD_FLAGS="${GO_BUILD_FLAGS}" "${GO_BUILD_ENV[@]}" go build $GO_BUILD_FLAGS \
-installsuffix=cgo \
"-ldflags=${GO_LDFLAGS[*]}" \
-o="../${out}/etcdctl" . || return 2