-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 1004 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
SEEDER_NAME?=
setup:
@cp .env.example app/infrastructure/server/grpc/.env
clean:
@echo "--- cleanup all build and generated files ---"
@rm -vf app/infrastructure/proto/pb/*.pb.go
protoc: clean
@echo "--- preparing proto output directories ---"
@mkdir -p app/infrastructure/proto/pb
@echo "--- Compiling all proto files ---"
# @cd ./app/infrastructure/proto && protoc --go_out=./pb --go_opt=paths=source_relative --go-grpc_out=./pb --go-grpc_opt=paths=source_relative *.proto
@cd ./app/infrastructure/proto && protoc --go_out=./pb --go_opt=paths=source_relative --go-grpc_out=./pb --go-grpc_opt=paths=source_relative *.proto
build-rest: protoc
@echo "--- Building binary file ---"
@go build -o ./main cmd/rest/rest.go
build-grpc: protoc
@echo "--- Building binary file ---"
@go build -o ./main cmd/grpc/grpc.go
run-grpc:
@go run cmd/grpc/grpc.go
seed:
@go run cmd/seeder/main.go $(SEEDER_NAME)
wire:
@echo "-- generate dependency injection --"
@wire ./app/infrastructure/container/