chore(Makefile): add GONOSUMDB and GOPROXY
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e6f4e1ea66
commit
4177d66ae6
24
Makefile
24
Makefile
@ -12,29 +12,48 @@ ls:
|
||||
# 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
|
||||
GONOSUMDB=${GONOSUMDB} \
|
||||
GOPROXY=${GOPROXY} \
|
||||
go test ./... -v -race
|
||||
|
||||
# Look for "suspicious constructs" in source code
|
||||
.PHONY: vet
|
||||
vet: download
|
||||
GONOSUMDB=${GONOSUMDB} \
|
||||
GOPROXY=${GOPROXY} \
|
||||
go vet ./...
|
||||
|
||||
# Format code
|
||||
.PHONY: fmt
|
||||
fmt: download
|
||||
GONOSUMDB=${GONOSUMDB} \
|
||||
GOPROXY=${GOPROXY} \
|
||||
go mod tidy
|
||||
|
||||
GONOSUMDB=${GONOSUMDB} \
|
||||
GOPROXY=${GOPROXY} \
|
||||
go fmt ./...
|
||||
|
||||
# Check for unformatted go code
|
||||
@ -45,7 +64,10 @@ check/fmt: download
|
||||
# Build project
|
||||
.PHONY: build
|
||||
build:
|
||||
CGO_ENABLED=0 go build \
|
||||
CGO_ENABLED=0
|
||||
GONOSUMDB=${GONOSUMDB} \
|
||||
GOPROXY=${GOPROXY} \
|
||||
go build \
|
||||
-ldflags "\
|
||||
-X main.version=${shell git describe --tags} \
|
||||
-X main.commit=${shell git rev-parse HEAD} \
|
||||
|
Loading…
Reference in New Issue
Block a user