Skip to content

Commit 65ea019

Browse files
committed
makefile targets to help local development/testing
1 parent 4d626c2 commit 65ea019

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Makefile

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
PKG := "github.com/labstack/echo"
2+
PKG_LIST := $(shell go list ${PKG}/...)
3+
14
tag:
25
@git tag `grep -P '^\tversion = ' echo.go|cut -f2 -d'"'`
36
@git tag|grep -v ^v
7+
8+
.DEFAULT_GOAL := check
9+
check: lint vet race ## Check project
10+
11+
init:
12+
@go get -u golang.org/x/lint/golint
13+
14+
lint: ## Lint the files
15+
@golint -set_exit_status ${PKG_LIST}
16+
17+
vet: ## Vet the files
18+
@go vet ${PKG_LIST}
19+
20+
test: ## Run tests
21+
@go test -short ${PKG_LIST}
22+
23+
race: ## Run tests with data race detector
24+
@go test -race ${PKG_LIST}
25+
26+
help: ## Display this help screen
27+
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 commit comments

Comments
 (0)