-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
44 lines (33 loc) · 1016 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
35
36
37
38
39
40
41
42
43
44
# Monorepo Makefile.
# Default Go binary.
ifndef GOROOT
GOROOT = /usr/local/go
endif
# Determine the OS to build.
ifeq ($(OS),)
ifeq ($(shell uname -s), Darwin)
GOOS = darwin
else
GOOS = linux
endif
else
GOOS = $(OS)
endif
GOCMD = GOOS=$(GOOS) go
GOTEST = $(GOCMD) test -race
GO_PKGS?=$$(go list ./... | grep -v /vendor/)
# See golangci.yml for linters setup
linter: ## Run linter
@golangci-lint run -c golangci.yml ./...;
proto-gen: ## Generate Go code (pb, grpc and grpc-gateway) of the api
@cd api && buf generate;
test: ## Run unit test (without integration tests)
$(GOTEST) -v $(GO_PKGS)
bench: ## Run go benchmarks
$(GOCMD) test -tags integration -bench=. ./... -benchmem
onboarding: ## Install tools for the project
@./sdlc/onboarding/onboarding.sh
codegen: ## install codegen in the gopath
@cd sdlc/codegen && $(GOCMD) install cmd/codegen.go
help: ## Show this help
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'