diff --git a/build b/build index ac6e37c5ff5..e08bcc4efd7 100755 --- a/build +++ b/build @@ -29,5 +29,5 @@ else fi # Static compilation is useful when etcd is run in a container -CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/version.GitSHA${LINK_OPERATOR}${GIT_SHA}" -o bin/etcd ${REPO_PATH} -CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "-s" -o bin/etcdctl ${REPO_PATH}/etcdctl +CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s -X ${REPO_PATH}/version.GitSHA${LINK_OPERATOR}${GIT_SHA}" -o bin/etcd ${REPO_PATH} +CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s" -o bin/etcdctl ${REPO_PATH}/etcdctl diff --git a/test b/test index ef38452ffe9..afcf39f69c5 100755 --- a/test +++ b/test @@ -13,6 +13,7 @@ set -e # Invoke ./cover for HTML output COVER=${COVER:-"-cover"} +GO_BUILD_FLAGS=-a source ./build # Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.