Skip to content

Commit

Permalink
build: get GitSHA first
Browse files Browse the repository at this point in the history
  • Loading branch information
gyuho committed Oct 14, 2016
1 parent 4c444df commit 06fd31c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

0 comments on commit 06fd31c

Please sign in to comment.