-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (31 loc) · 1.13 KB
/
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
45
SHELL := /bin/bash
# ==============================================================================
# Docker support
serve:
docker-compose -f infra/docker-compose.yaml up -d users_mng_svc
rebuild: stop
docker-compose -f infra/docker-compose.yaml up -d --build --force-recreate users_mng_svc
stop:
docker-compose -f infra/docker-compose.yaml down
logs:
docker logs users_mng_svc
# ==============================================================================
# Proto support
gen-proto:
rm -Rf proto
mkdir -p proto
protoc --go_out=proto --go-grpc_out=proto ./proto-schemas/services/user/*
protoc --go_out=proto --go-grpc_out=proto ./proto-schemas/events/*
# ==============================================================================
lint:
docker run --rm -v $(CURDIR):/app -w /app golangci/golangci-lint:v1.48.0 golangci-lint run -v
# =============================================================================
test:
go test ./... -coverprofile=coverage.out -count=1
coverage: test
go tool cover -func coverage.out
report: coverage
go tool cover -html=coverage.out -o cover.html
update-deps:
go get -u -v ./...
go mod tidy