chore(Makefile): remove seperate target to download dependencies
This commit is contained in:
parent
01af95399d
commit
9f28dacf85
30
Makefile
30
Makefile
@ -9,45 +9,23 @@ CONTAINER_RUNTIME?=$(shell which podman)
|
|||||||
ls:
|
ls:
|
||||||
cat Makefile | grep "^[a-zA-Z#].*" | cut -d ":" -f 1 | sed s';#;\n#;'g
|
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
|
# Run project tests
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: download
|
test:
|
||||||
GONOSUMDB=${GONOSUMDB} \
|
GONOSUMDB=${GONOSUMDB} \
|
||||||
GOPROXY=${GOPROXY} \
|
GOPROXY=${GOPROXY} \
|
||||||
go test ./... -v -race
|
go test ./... -v -race
|
||||||
|
|
||||||
# Look for "suspicious constructs" in source code
|
# Look for "suspicious constructs" in source code
|
||||||
.PHONY: vet
|
.PHONY: vet
|
||||||
vet: download
|
vet:
|
||||||
GONOSUMDB=${GONOSUMDB} \
|
GONOSUMDB=${GONOSUMDB} \
|
||||||
GOPROXY=${GOPROXY} \
|
GOPROXY=${GOPROXY} \
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|
||||||
# Format code
|
# Format code
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
fmt: download
|
fmt:
|
||||||
GONOSUMDB=${GONOSUMDB} \
|
GONOSUMDB=${GONOSUMDB} \
|
||||||
GOPROXY=${GOPROXY} \
|
GOPROXY=${GOPROXY} \
|
||||||
go mod tidy
|
go mod tidy
|
||||||
@ -58,7 +36,7 @@ fmt: download
|
|||||||
|
|
||||||
# Check for unformatted go code
|
# Check for unformatted go code
|
||||||
.PHONY: check/fmt
|
.PHONY: check/fmt
|
||||||
check/fmt: download
|
check/fmt:
|
||||||
test -z $(shell gofmt -l .)
|
test -z $(shell gofmt -l .)
|
||||||
|
|
||||||
# Build project
|
# Build project
|
||||||
|
Loading…
x
Reference in New Issue
Block a user