diff options
author | Paul Holzinger <pholzing@redhat.com> | 2022-05-03 18:34:38 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2022-05-03 18:43:18 +0200 |
commit | 9166894c696582ee37893ce92a694ba227744fa0 (patch) | |
tree | 8b4c9ffa20de8a4a484c0a427fc74b5c22634994 /Makefile | |
parent | 1e0c50df38ff955011f7ebb83a0268f3f1cd2841 (diff) | |
download | podman-9166894c696582ee37893ce92a694ba227744fa0.tar.gz podman-9166894c696582ee37893ce92a694ba227744fa0.tar.bz2 podman-9166894c696582ee37893ce92a694ba227744fa0.zip |
vendor test dependencies instead of installing via network
We can vendor the test dependencies such as go-md2man, git-validation
and goimports. This allows us to always install the same version as
specified in go.mod. Also we do not rely on a network connection for
this.
The advantage with this method is that dependabot will also update the
dependencies for us and we do not have to hardcode versions in the
Makefile.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -174,10 +174,6 @@ endif # Necessary for nested-$(MAKE) calls and docs/remote-docs.sh export GOOS GOARCH CGO_ENABLED BINSFX SRCBINDIR -define go-install - $(GO) install ${1}@latest -endef - # Need to use CGO for mDNS resolution, but cross builds need CGO disabled # See https://github.com/golang/go/issues/12524 for details DARWIN_GCO := 0 @@ -864,7 +860,7 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal .install.goimports: .gopathok if [ ! -x "$(GOBIN)/goimports" ]; then \ - $(call go-install,golang.org/x/tools/cmd/goimports); \ + $(GO) install ./vendor/golang.org/x/tools/cmd/goimports ; \ fi touch .install.goimports @@ -877,7 +873,7 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal .PHONY: .install.gitvalidation .install.gitvalidation: .gopathok if [ ! -x "$(GOBIN)/git-validation" ]; then \ - $(call go-install,github.com/vbatts/git-validation); \ + $(GO) install ./vendor/github.com/vbatts/git-validation ; \ fi .PHONY: .install.golangci-lint @@ -897,7 +893,7 @@ install.tools: .install.goimports .install.gitvalidation .install.md2man .instal .PHONY: .install.md2man .install.md2man: .gopathok if [ ! -x "$(GOMD2MAN)" ]; then \ - $(call go-install,github.com/cpuguy83/go-md2man); \ + $(GO) install ./vendor/github.com/cpuguy83/go-md2man/v2 ; \ fi # $BUILD_TAGS variable is used in hack/golangci-lint.sh |