mirror of
https://github.com/encounter/go-rtmp.git
synced 2026-03-30 11:12:49 -07:00
8305a133ba
Signed-off-by: Christian Stewart <christian@paral.in>
35 lines
681 B
Makefile
35 lines
681 B
Makefile
REVISION = $(shell git rev-parse --short HEAD)
|
|
GOLANGCI_LINT=hack/bin/golangci-lint
|
|
GO111MODULE=on
|
|
|
|
all: pre test
|
|
|
|
pre: fmt lint vet
|
|
|
|
fmt:
|
|
go fmt ./...
|
|
|
|
lint: $(GOLANGCI_LINT)
|
|
$(GOLANGCI_LINT) run ./...
|
|
|
|
vet:
|
|
go vet $$(go list ./... | grep -v /vendor/)
|
|
|
|
test:
|
|
go test -cover -v -race -timeout 10s ./...
|
|
|
|
bench:
|
|
go test -bench . -benchmem -gcflags="-m -m -l" ./...
|
|
|
|
example:
|
|
go build -i -v -o dist/server_demo ./example/server_demo/...
|
|
go build -i -v -o dist/client_demo ./example/client_demo/...
|
|
|
|
$(GOLANGCI_LINT):
|
|
cd ./hack; \
|
|
go build -v \
|
|
-o ./bin/golangci-lint \
|
|
github.com/golangci/golangci-lint/cmd/golangci-lint
|
|
|
|
.PHONY: all pre fmt lint vet test bench example
|