mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #6532 from heyitsanthony/no-gopath-build
build: support building out of path when GOPATH is not set
This commit is contained in:
commit
e68cd086ee
@ -55,6 +55,6 @@ script:
|
||||
;;
|
||||
*)
|
||||
# test building out of gopath
|
||||
GO_BUILD_FLAGS="-a -v" GOPATH=/bad-go-path GOARCH="${TARGET}" ./build
|
||||
GO_BUILD_FLAGS="-a -v" GOPATH="" GOARCH="${TARGET}" ./build
|
||||
;;
|
||||
esac
|
||||
|
5
build
5
build
@ -40,7 +40,10 @@ etcd_setup_gopath() {
|
||||
cd "$CDIR"
|
||||
etcdGOPATH=${CDIR}/gopath
|
||||
# preserve old gopath to support building with unvendored tooling deps (e.g., gofail)
|
||||
export GOPATH=${etcdGOPATH}:$GOPATH
|
||||
if [ -n "$GOPATH" ]; then
|
||||
GOPATH=":$GOPATH"
|
||||
fi
|
||||
export GOPATH=${etcdGOPATH}$GOPATH
|
||||
rm -f ${etcdGOPATH}/src
|
||||
mkdir -p ${etcdGOPATH}
|
||||
ln -s ${CDIR}/cmd/vendor ${etcdGOPATH}/src
|
||||
|
Loading…
x
Reference in New Issue
Block a user