diff --git a/build b/build index d390013519d..efa58314938 100755 --- a/build +++ b/build @@ -27,11 +27,8 @@ toggle_failpoints() { } etcd_build() { - if [ -z "${GOARCH}" ] || [ "${GOARCH}" = "$(go env GOHOSTARCH)" ]; then - out="bin" - else - out="bin/${GOARCH}" - fi + out="bin" + if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi toggle_failpoints # Static compilation is useful when etcd is run in a container CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=${GIT_SHA}" -o ${out}/etcd ${REPO_PATH}/cmd