generated from daystram/go-gin-gorm-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.29 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
.PHONY: all be fe clean
all: be fe
be: be_install_dependencies be_build_proto
fe: fe_install_dependencies fe_build_proto
clean: be_clean fe_clean
be_install_dependencies:
@echo "Installing dependencies for fableous-be proto building..."
@apt install -y protobuf-compiler
@go install google.golang.org/protobuf/cmd/[email protected]
be_install_dependencies_elevated:
@echo "Installing dependencies for fableous-be proto building..."
@sudo apt install -y protobuf-compiler
@go install google.golang.org/protobuf/cmd/[email protected]
be_build_proto:
@echo "Building protos for fableous-be..."
@mkdir -p fableous-be/protos
@cd proto && protoc \
--go_out=../fableous-be/protos \
--go_opt=paths=source_relative \
--go_opt=Mmessage.proto=github.com/deco-finter/fableous/fableous-be/protos \
message.proto
fe_install_dependencies:
@echo "Installing dependencies for fableous-fe proto building..."
@yarn --cwd proto
fe_build_proto:
@echo "Building protos for fableous-fe..."
@mkdir -p fableous-fe/src/proto
@cd proto && npx pbjs -t static-module -w commonjs -o ../fableous-fe/src/proto/message_pb.js message.proto
@cd proto && npx pbts -o ../fableous-fe/src/proto/message_pb.d.ts ../fableous-fe/src/proto/message_pb.js
be_clean:
rm -rf fableous-be/protos
fe_clean:
rm -rf fableous-fe/src/proto