1
0
Fork 0
telegram/Makefile

25 lines
706 B
Makefile
Raw Permalink Normal View History

PACKAGE_NAME := "gitlab.com/toby3d/telegram"
2018-07-29 15:41:59 +00:00
PACKAGE_LIST := $(shell go list $(PACKAGE_NAME)/... | grep -v /vendor/)
.PHONY: all lint test rase coverage tidy
2018-07-29 15:41:59 +00:00
all: tidy test race lint
2018-07-29 15:41:59 +00:00
lint: ## Lint the files
2019-07-26 10:17:35 +00:00
@golangci-lint run ./...
2018-07-29 15:41:59 +00:00
test: ## Run unittests
2019-07-26 10:17:35 +00:00
@go test -short $(PACKAGE_NAME)/...
2018-07-29 15:41:59 +00:00
race: tidy ## Run data race detector
2018-07-29 15:41:59 +00:00
@go test -race -short ${PACKAGE_LIST}
coverage: ## Generate global code coverage report
2019-07-26 10:17:35 +00:00
@go test -cover -v -coverpkg=$(PACKAGE_NAME)/... ${PACKAGE_LIST}
2018-07-29 15:41:59 +00:00
tidy: ## Get the dependencies
@go mod tidy
2018-07-29 15:41:59 +00:00
help: ## Display this help screen
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'