Merge pull request #4095 from xyz-li/master

go build with vendor by default
This commit is contained in:
KubeSphere CI Bot
2021-07-30 10:34:45 +08:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -15,7 +15,10 @@ GOBIN=$(shell go env GOBIN)
endif
OUTPUT_DIR=bin
GOFLAGS=-mod=vendor
ifeq (${GOFLAGS},)
# go build with vendor by default.
export GOFLAGS=-mod=vendor
endif
define ALL_HELP_INFO
# Build code.
#

View File

@@ -31,6 +31,8 @@ PATH="${GOBIN}:${PATH}"
# Install tools we need
pushd "${KUBE_ROOT}/hack/tools" >/dev/null
# As GOFLAGS may equal to `-mod=vendor`, we must download the modules to vendor or go install will fail.
go mod vendor
GO111MODULE=on go install github.com/client9/misspell/cmd/misspell
popd >/dev/null