-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
34 lines (24 loc) · 874 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#
# Project Makefile
#
export GO111MODULE=on
.PHONY: setup help dep format lint vet build build-docker test test-coverage
.DEFAULT: help
dev-deps: ## Install Development dependencies
npm i -g conventional-changelog-cli commitizen
dev: ## Setup the Development envrionment
pre-commit install
fmt: ## Formats the go code using gofmt
@gofmt -w -s .
lint: ## Lint code
@revive -config revive.toml -formatter friendly $(PACKAGE)
vet: ## Run go vet
@go vet $(PACKAGE)
build: ## Build the app
@go build -o build/app logger.go
test: ## Run package unit testsS
@go test -v -race -short ./...
test-coverage: ## Run tests with coverage
@go test -short -coverprofile cover.out -covermode=atomic ./...
help: ## Displays help menu
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'