mirror of
https://github.com/pushbits/server.git
synced 2025-04-29 10:16:50 +02:00
20 lines
437 B
Makefile
20 lines
437 B
Makefile
.PHONY: build
|
|
build:
|
|
mkdir -p ./out
|
|
go build -ldflags="-w -s" -o ./out/pushbits ./cmd/pushbits
|
|
|
|
.PHONY: test
|
|
test:
|
|
stdout=$$(gofmt -l . 2>&1); \
|
|
if [ "$$stdout" ]; then \
|
|
exit 1; \
|
|
fi
|
|
go vet ./...
|
|
gocyclo -over 10 $(shell find . -iname '*.go' -type f)
|
|
staticcheck ./...
|
|
go test -v -cover ./...
|
|
|
|
.PHONY: setup
|
|
setup:
|
|
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
|
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|