Defaulting to using go modules vendored (#12040)

Этот коммит содержится в:
Christopher Speller
2019-09-24 13:01:53 -07:00
коммит произвёл Ben Schumacher
родитель 99f13ed0e6
Коммит 7966397f1f
6 изменённых файлов: 11 добавлений и 14 удалений

Просмотреть файл

@@ -45,8 +45,9 @@ else
endif
# Golang Flags
export GO111MODULE=on
GOPATH ?= $(shell go env GOPATH)
GOFLAGS ?= $(GOFLAGS:)
GOFLAGS ?= $(GOFLAGS:) -mod=vendor
GO=go
DELVE=dlv
LDFLAGS += -X "github.com/mattermost/mattermost-server/model.BuildNumber=$(BUILD_NUMBER)"
@@ -141,7 +142,7 @@ clean-docker: ## Deletes the docker containers for local development.
govet: ## Runs govet against all packages.
@echo Running GOVET
$(GO) get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
env GO111MODULE=off $(GO) get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
$(GO) vet $(GOFLAGS) $(ALL_PACKAGES) || exit 1
$(GO) vet -vettool=$(GOPATH)/bin/shadow $(GOFLAGS) $(ALL_PACKAGES) || exit 1
$(GO) run plugin/checker/main.go
@@ -151,7 +152,7 @@ gofmt: ## Runs gofmt against all packages.
@for package in $(TE_PACKAGES) $(EE_PACKAGES); do \
echo "Checking "$$package; \
files=$$(go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \
files=$$($(GO) list $(GOFLAGS) -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' $$package); \
if [ "$$files" ]; then \
gofmt_output=$$(gofmt -d -s $$files 2>&1); \
if [ "$$gofmt_output" ]; then \
@@ -180,7 +181,7 @@ store-mocks: ## Creates mock files.
$(GOPATH)/bin/mockery -dir store -all -output store/storetest/mocks -note 'Regenerate this file using `make store-mocks`.'
store-layers: ## Generate layers for the store
go generate ./store
$(GO) generate $(GOFLAGS) ./store
filesstore-mocks: ## Creates mock files.
env GO111MODULE=off go get -u github.com/vektra/mockery/...
@@ -201,7 +202,7 @@ einterfaces-mocks: ## Creates mock files for einterfaces.
$(GOPATH)/bin/mockery -dir einterfaces -all -output einterfaces/mocks -note 'Regenerate this file using `make einterfaces-mocks`.'
pluginapi: ## Generates api and hooks glue code for plugins
go generate ./plugin
$(GO) generate $(GOFLAGS) ./plugin
check-licenses: ## Checks license status.
./scripts/license-check.sh $(TE_PACKAGES) $(EE_PACKAGES)
@@ -409,7 +410,7 @@ config-ldap: ## Configures LDAP.
config-reset: ## Resets the config/config.json file to the default.
@echo Resetting configuration to default
rm -f config/config.json
OUTPUT_CONFIG=$(PWD)/config/config.json go generate ./config
OUTPUT_CONFIG=$(PWD)/config/config.json $(GO) generate $(GOFLAGS) ./config
diff-config: ## Compares default configuration between two mattermost versions
@./scripts/diff-config.sh