diff --git a/Makefile b/Makefile index 3ce96ef..7d1410c 100644 --- a/Makefile +++ b/Makefile @@ -9,45 +9,23 @@ CONTAINER_RUNTIME?=$(shell which podman) ls: cat Makefile | grep "^[a-zA-Z#].*" | cut -d ":" -f 1 | sed s';#;\n#;'g -# Download dependencies -.PHONY: download -download: - GONOSUMDB=${GONOSUMDB} \ - GOPROXY=${GOPROXY} \ - go mod download - -# Update project dependencies -.PHONY: update -update: - GONOSUMDB=${GONOSUMDB} \ - GOPROXY=${GOPROXY} \ - go get -u - - GONOSUMDB=${GONOSUMDB} \ - GOPROXY=${GOPROXY} \ - go mod download - - GONOSUMDB=${GONOSUMDB} \ - GOPROXY=${GOPROXY} \ - go mod tidy - # Run project tests .PHONY: test -test: download +test: GONOSUMDB=${GONOSUMDB} \ GOPROXY=${GOPROXY} \ go test ./... -v -race # Look for "suspicious constructs" in source code .PHONY: vet -vet: download +vet: GONOSUMDB=${GONOSUMDB} \ GOPROXY=${GOPROXY} \ go vet ./... # Format code .PHONY: fmt -fmt: download +fmt: GONOSUMDB=${GONOSUMDB} \ GOPROXY=${GOPROXY} \ go mod tidy @@ -58,7 +36,7 @@ fmt: download # Check for unformatted go code .PHONY: check/fmt -check/fmt: download +check/fmt: test -z $(shell gofmt -l .) # Build project