mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-20 19:26:17 +08:00
build: apply "-mod vendor" also to test target
This commit is contained in:
5
Makefile
5
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 ./...
|
||||
|
||||
Reference in New Issue
Block a user