Use predefined go command consistently (#13216)

Этот коммит содержится в:
Ben Schumacher
2019-11-26 19:37:41 +01:00
коммит произвёл Claudio Costa
родитель 75c4fcb87e
Коммит a1a2bb3130

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

@@ -165,32 +165,32 @@ ifeq ($(BUILD_ENTERPRISE_READY),true)
endif
i18n-extract: ## Extract strings for translation from the source code
env GO111MODULE=off go get -u github.com/mattermost/mattermost-utilities/mmgotool
env GO111MODULE=off $(GO) get -u github.com/mattermost/mattermost-utilities/mmgotool
$(GOPATH)/bin/mmgotool i18n extract
store-mocks: ## Creates mock files.
env GO111MODULE=off go get -u github.com/vektra/mockery/...
env GO111MODULE=off $(GO) get -u github.com/vektra/mockery/...
$(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 $(GOFLAGS) ./store
filesstore-mocks: ## Creates mock files.
env GO111MODULE=off go get -u github.com/vektra/mockery/...
env GO111MODULE=off $(GO) get -u github.com/vektra/mockery/...
$(GOPATH)/bin/mockery -dir services/filesstore -all -output services/filesstore/mocks -note 'Regenerate this file using `make filesstore-mocks`.'
ldap-mocks: ## Creates mock files for ldap.
env GO111MODULE=off go get -u github.com/vektra/mockery/...
env GO111MODULE=off $(GO) get -u github.com/vektra/mockery/...
$(GOPATH)/bin/mockery -dir enterprise/ldap -all -output enterprise/ldap/mocks -note 'Regenerate this file using `make ldap-mocks`.'
plugin-mocks: ## Creates mock files for plugins.
env GO111MODULE=off go get -u github.com/vektra/mockery/...
env GO111MODULE=off $(GO) get -u github.com/vektra/mockery/...
$(GOPATH)/bin/mockery -dir plugin -name API -output plugin/plugintest -outpkg plugintest -case underscore -note 'Regenerate this file using `make plugin-mocks`.'
$(GOPATH)/bin/mockery -dir plugin -name Hooks -output plugin/plugintest -outpkg plugintest -case underscore -note 'Regenerate this file using `make plugin-mocks`.'
$(GOPATH)/bin/mockery -dir plugin -name Helpers -output plugin/plugintest -outpkg plugintest -case underscore -note 'Regenerate this file using `make plugin-mocks`.'
einterfaces-mocks: ## Creates mock files for einterfaces.
env GO111MODULE=off go get -u github.com/vektra/mockery/...
env GO111MODULE=off $(GO) get -u github.com/vektra/mockery/...
$(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
@@ -244,7 +244,7 @@ do-cover-file: ## Creates the test coverage report file.
@echo "mode: count" > cover.out
go-junit-report:
env GO111MODULE=off go get -u github.com/jstemmer/go-junit-report
env GO111MODULE=off $(GO) get -u github.com/jstemmer/go-junit-report
test-compile: ## Compile tests.
@echo COMPILE TESTS
@@ -414,7 +414,7 @@ clean: stop-docker ## Clean up everything except persistant server data.
@echo Cleaning
rm -Rf $(DIST_ROOT)
go clean $(GOFLAGS) -i ./...
$(GO) clean $(GOFLAGS) -i ./...
cd $(BUILD_WEBAPP_DIR) && $(MAKE) clean
@@ -446,13 +446,13 @@ update-dependencies: ## Uses go get -u to update all the dependencies while hold
@echo Updating Dependencies
# Update all dependencies (does not update across major versions)
go get -u
$(GO) get -u
# Tidy up
go mod tidy
$(GO) mod tidy
# Copy everything to vendor directory
go mod vendor
$(GO) mod vendor
todo: ## Display TODO and FIXME items in the source code.