-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (34 loc) · 1007 Bytes
/
Makefile
File metadata and controls
45 lines (34 loc) · 1007 Bytes
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
.DEFAULT_GOAL := build
.PHONY: build
build:
go build -o ingredients.o ./cmd/ingredients/ingredients.go
.PHONY: gen/proto
gen/proto:
protoc --go_out=. --go_opt=paths=import \
--go-grpc_out=. --go-grpc_opt=paths=import \
./api/*.proto
.PHONY: gen
gen: gen/proto
go generate ./...
.PHONY: test
test:
go test ./... -v -coverpkg=./internal/... -coverprofile=coverage.out
.PHONY: testshort
testshort:
go test ./... -v -test.short=true -coverpkg=./internal/... -coverprofile=coverage.out
.PHONY: c
c:
go tool cover -func coverage.out
.PHONY: tc
tc: testshort c
.PHONY: lines
lines:
git ls-files | xargs wc -l
.PHONY: dock
dock:
docker build -f infra/server.dockerfile . --tag=vladmarlo/hell_kitchen_ingredients:latest
docker build -f infra/migrator.dockerfile . --tag=vladmarlo/hell_kitchen_ingredients_migrator:latest
.PHONY: dock/push
dock/push:
docker push vladmarlo/hell_kitchen_ingredients:latest
docker push vladmarlo/hell_kitchen_ingredients_migrator:latest