From d7092b360d79665752bce01074df7e88ae166cc5 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Tue, 27 Feb 2018 10:23:48 -0800 Subject: [PATCH] hack/scripts-dev: fix "compile-with-docker-test" in Makefile Signed-off-by: Gyuho Lee --- hack/scripts-dev/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hack/scripts-dev/Makefile b/hack/scripts-dev/Makefile index 2de4b9bbb41..12f2729b1b1 100644 --- a/hack/scripts-dev/Makefile +++ b/hack/scripts-dev/Makefile @@ -71,14 +71,23 @@ pull-docker-test: # Example: # make build-docker-test -f ./hack/scripts-dev/Makefile # make compile-with-docker-test -f ./hack/scripts-dev/Makefile +# make compile-setup-gopath-with-docker-test -f ./hack/scripts-dev/Makefile compile-with-docker-test: + $(info GO_VERSION: $(GO_VERSION)) + docker run \ + --rm \ + --mount type=bind,source=`pwd`,destination=/go/src/github.com/coreos/etcd \ + gcr.io/etcd-development/etcd-test:go$(GO_VERSION) \ + /bin/bash -c "GO_BUILD_FLAGS=-v ./build && ./bin/etcd --version" + +compile-setup-gopath-with-docker-test: $(info GO_VERSION: $(GO_VERSION)) docker run \ --rm \ --mount type=bind,source=`pwd`,destination=/etcd \ gcr.io/etcd-development/etcd-test:go$(GO_VERSION) \ - /bin/bash -c "cd /etcd && GO_BUILD_FLAGS=-v ./build && ./bin/etcd --version" + /bin/bash -c "cd /etcd && ETCD_SETUP_GOPATH=1 GO_BUILD_FLAGS=-v ./build && ./bin/etcd --version && rm -rf ./gopath"