mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

Moves the vendor/ directory to cmd/vendor. Vendored binaries are built from cmd/, which is backed by symlinks pointing back to repo root.
17 lines
534 B
Bash
Executable File
17 lines
534 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
ORG_PATH="github.com/coreos"
|
|
REPO_PATH="${ORG_PATH}/etcd"
|
|
|
|
export GO15VENDOREXPERIMENT="1"
|
|
|
|
eval $(go env)
|
|
|
|
GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"`
|
|
|
|
LINK_OPERATOR="="
|
|
|
|
# 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}/version.GitSHA${LINK_OPERATOR}${GIT_SHA}" -o bin/etcd ${REPO_PATH}/cmd
|
|
CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "-s" -o bin/etcdctl ${REPO_PATH}/cmd/etcdctl
|