mirror of https://github.com/containers/podman.git
Makefile: add go-get function
Add a `go-get` function to the Makefile to wrap `go get -u` into a wrapper disabling go modules. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
parent
b611ac1c50
commit
a3211b73c6
14
Makefile
14
Makefile
|
@ -332,11 +332,15 @@ uninstall:
|
||||||
GIT_CHECK_EXCLUDE="./vendor" $(GOBIN)/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
|
GIT_CHECK_EXCLUDE="./vendor" $(GOBIN)/git-validation -v -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
|
||||||
|
|
||||||
.PHONY: install.tools
|
.PHONY: install.tools
|
||||||
|
|
||||||
install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo ## Install needed tools
|
install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ginkgo ## Install needed tools
|
||||||
|
|
||||||
|
define go-get
|
||||||
|
env GO111MODULE=off \
|
||||||
|
$(GO) get -u ${1}
|
||||||
|
endef
|
||||||
|
|
||||||
.install.vndr: .gopathok
|
.install.vndr: .gopathok
|
||||||
$(GO) get -u github.com/LK4D4/vndr
|
$(call go-get,github.com/LK4D4/vndr)
|
||||||
|
|
||||||
.install.ginkgo: .gopathok
|
.install.ginkgo: .gopathok
|
||||||
if [ ! -x "$(GOBIN)/ginkgo" ]; then \
|
if [ ! -x "$(GOBIN)/ginkgo" ]; then \
|
||||||
|
@ -345,12 +349,12 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
|
||||||
|
|
||||||
.install.gitvalidation: .gopathok
|
.install.gitvalidation: .gopathok
|
||||||
if [ ! -x "$(GOBIN)/git-validation" ]; then \
|
if [ ! -x "$(GOBIN)/git-validation" ]; then \
|
||||||
$(GO) get -u github.com/vbatts/git-validation; \
|
$(call go-get,github.com/vbatts/git-validation); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.install.gometalinter: .gopathok
|
.install.gometalinter: .gopathok
|
||||||
if [ ! -x "$(GOBIN)/gometalinter" ]; then \
|
if [ ! -x "$(GOBIN)/gometalinter" ]; then \
|
||||||
$(GO) get -u github.com/alecthomas/gometalinter; \
|
$(call go-get,github.com/alecthomas/gometalinter); \
|
||||||
cd $(FIRST_GOPATH)/src/github.com/alecthomas/gometalinter; \
|
cd $(FIRST_GOPATH)/src/github.com/alecthomas/gometalinter; \
|
||||||
git checkout e8d801238da6f0dfd14078d68f9b53fa50a7eeb5; \
|
git checkout e8d801238da6f0dfd14078d68f9b53fa50a7eeb5; \
|
||||||
$(GO) install github.com/alecthomas/gometalinter; \
|
$(GO) install github.com/alecthomas/gometalinter; \
|
||||||
|
@ -359,7 +363,7 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man .ins
|
||||||
|
|
||||||
.install.md2man: .gopathok
|
.install.md2man: .gopathok
|
||||||
if [ ! -x "$(GOBIN)/go-md2man" ]; then \
|
if [ ! -x "$(GOBIN)/go-md2man" ]; then \
|
||||||
$(GO) get -u github.com/cpuguy83/go-md2man; \
|
$(call go-get,github.com/cpuguy83/go-md2man); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.install.ostree: .gopathok
|
.install.ostree: .gopathok
|
||||||
|
|
Loading…
Reference in New Issue