From ff2ccbed6cd31c5ff3d9c362d43c2efd167d1509 Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Mon, 24 Jun 2019 13:26:40 +0000 Subject: [PATCH] build: apply "-mod vendor" also to test target --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 59b1a17f19..dc0b68843c 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,8 @@ LDFLAGS := "-w \ ##################################################### -GO_BUILD := go build -mod vendor -ldflags $(LDFLAGS) +GO_BUILD_FLAGS:=-mod vendor -ldflags $(LDFLAGS) +GO_BUILD := go build $(GO_BUILD_FLAGS) GO_INSTALL := go install -ldflags $(LDFLAGS) GO_TEST := go test @@ -64,7 +65,7 @@ gencopyright: @sh scripts/gencopyright.sh pkg cmd test: - @go test $(shell GO111MODULE=on go list ./... | egrep -v 'host-image|hostimage') + @go test $(GO_BUILD_FLAGS) $(shell go list ./... | egrep -v 'host-image|hostimage') vet: go vet ./...