Fix Makefile

This commit is contained in:
Daniel Carrillo 2021-11-10 20:27:02 +01:00
parent 2fcfa91545
commit c0d1143de6
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

View File

@ -1,3 +1,4 @@
GOPATH ?= $(shell go env GOPATH)
VERSION ?= devel-$(shell git rev-parse --short HEAD) VERSION ?= devel-$(shell git rev-parse --short HEAD)
DOCKER_URL ?= dcarrillo/whatismyip DOCKER_URL ?= dcarrillo/whatismyip
@ -13,13 +14,13 @@ integration-test:
go test ./integration-tests -v go test ./integration-tests -v
.PHONY: install-tools .PHONY: install-tools
install-int: install-tools:
@hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @command golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.43.0 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.43.0; \
fi fi
@hash shadow > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ @command $(GOPATH)/shadow > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.1.7 go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@v0.1.7; \
fi fi
.PHONY: lint .PHONY: lint
lint: install-tools lint: install-tools