-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install tools (mage, goimports, etc.) from vendor folder (#15998)
## What does this PR do? This PR adds a new file `tools/tools.go` to list the tools we need during checking, building and packaging Beats. This is the suggested approach to list tool dependencies: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module The following tools are added: - `github.com/magefile/mage` - `github.com/pierrre/gotestcover` - `github.com/tsg/go-daemon` - `golang.org/x/tools/cmd/goimports` - `github.com/elastic/go-licenser` ## Why is it important? The tools are required to run `make check` on the CI.
- Loading branch information
Showing
66 changed files
with
5,047 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
MAGE_VERSION ?= v1.9.0 | ||
MAGE_PRESENT := $(shell mage --version 2> /dev/null | grep $(MAGE_VERSION)) | ||
MAGE_IMPORT_PATH ?= github.com/elastic/beats/vendor/github.com/magefile/mage | ||
MAGE_IMPORT_PATH ?= github.com/magefile/mage | ||
export MAGE_IMPORT_PATH | ||
|
||
.PHONY: mage | ||
mage: | ||
ifndef MAGE_PRESENT | ||
@echo Installing mage $(MAGE_VERSION) from vendor dir. | ||
go install -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH} | ||
go install -mod=vendor -ldflags="-X $(MAGE_IMPORT_PATH)/mage.gitTag=$(MAGE_VERSION)" ${MAGE_IMPORT_PATH} | ||
@-mage -clean | ||
endif | ||
@true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.