This repository was archived by the owner on Feb 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (47 loc) · 1.51 KB
/
Makefile
File metadata and controls
60 lines (47 loc) · 1.51 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
build-app:
docker compose -f ./build/docker-compose.yml up --build -d
clean-app:
docker compose -f ./proxy-server/docker-compose.yml down
test-app:
docker compose -f ./build/docker-compose-test.yml up redis --build -d
if docker compose -f ./build/docker-compose-test.yml up server --build ; then \
docker compose -f ./build/docker-compose-test.yml down; \
exit 0; \
else \
docker compose -f ./build/docker-compose-test.yml down; \
exit 1; \
fi
benchmark-app:
go test -bench . -cpuprofile cpu.out
sqlc-synchronize:
curl -s -L https://raw.githubusercontent.com/Goboolean/shared/main/api/sql/schema.sql -o ./api/sql/schema.sql; \
curl -s -L https://raw.githubusercontent.com/Goboolean/shared/main/api/sql/schema.test.sql -o ./api/sql/schema.test.sql; \
sqlc-generate: \
sqlc-synchronize; \
sqlc generate -f ./api/sql/sqlc.yml
sqlc-check: \
sqlc-synchronize; \
sqlc compile -f ./api/sql/sqlc.yml
GRPC_PROTO_PATH = ./api/grpc/fetch-server.proto
GRPC_GEN_PATH = .
grpc-generate:
protoc \
--go_out=${GRPC_GEN_PATH} \
--go_opt=paths=source_relative \
--go-grpc_out=$(GRPC_GEN_PATH) \
--go-grpc_opt=paths=source_relative \
${GRPC_PROTO_PATH}
REDIS_MODEL_PROTO_PATH = ./api/redis-model/model.proto
REDIS_MODEL_GEN_PATH = ./internal/infrastructure/redis
proto-generate:
protoc \
--go_out=. \
--go_opt=paths=source_relative \
./api/model/model.proto
wire-generate:
wire cmd/inject/infrastructure.go cmd/inject/service.go
all-generate: \
sqlc-generate \
grpc-generate \
proto-generate \
wire-generate