build: get GitSHA first
parent
4c444df7a6
commit
06fd31cde9
8
build
8
build
|
@ -5,16 +5,16 @@ ORG_PATH="github.com/coreos"
|
|||
REPO_PATH="${ORG_PATH}/etcd"
|
||||
export GO15VENDOREXPERIMENT="1"
|
||||
|
||||
# Set GO_LDFLAGS="" for building with all symbols for debugging.
|
||||
if [ -z "${GO_LDFLAGS+x}" ]; then GO_LDFLAGS="-s"; fi
|
||||
GO_LDFLAGS="$GO_LDFLAGS -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=${GIT_SHA}"
|
||||
|
||||
eval $(go env)
|
||||
GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"`
|
||||
if [ ! -z "$FAILPOINTS" ]; then
|
||||
GIT_SHA="$GIT_SHA"-FAILPOINTS
|
||||
fi
|
||||
|
||||
# Set GO_LDFLAGS="" for building with all symbols for debugging.
|
||||
if [ -z "${GO_LDFLAGS+x}" ]; then GO_LDFLAGS="-s"; fi
|
||||
GO_LDFLAGS="$GO_LDFLAGS -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=${GIT_SHA}"
|
||||
|
||||
# enable/disable failpoints
|
||||
toggle_failpoints() {
|
||||
FAILPKGS="etcdserver/ mvcc/backend/"
|
||||
|
|
Loading…
Reference in New Issue