File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 11PROTOS_DIR =./protos
22PYTHON_PROTOS_OUTPUT_DIR =./AIaaS_interface
33PYTHON_REQUIREMENTS_FILE_PATH =./requirements.txt
4-
4+ GOLANG_PROTOS_OUTPUT_DIR =./golang
55
66clean :
77 rm -rf $(PYTHON_PROTOS_OUTPUT_DIR )
8+ rm -rf $(GOLANG_PROTOS_OUTPUT_DIR )
89
910set_new_version_tag :
1011 bash ./scripts/generate_new_version_tag.sh
1112
1213install_python_requirements :
1314 pip install -r $(PYTHON_REQUIREMENTS_FILE_PATH )
1415
16+ install_golang_requirements :
17+ sudo apt-get update && sudo apt-get install -y protobuf-compiler
18+ go install google.golang.org/protobuf/cmd/protoc-gen-go
19+ go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
20+
1521generate_python_protos : clean install_python_requirements
1622 mkdir $(PYTHON_PROTOS_OUTPUT_DIR )
1723 find $(PROTOS_DIR ) -name " *.proto" \
@@ -21,3 +27,11 @@ generate_python_protos: clean install_python_requirements
2127 --pyi_out=$(PYTHON_PROTOS_OUTPUT_DIR ) \
2228 --grpc_python_out=$(PYTHON_PROTOS_OUTPUT_DIR ) {} \;
2329 bash ./scripts/add_init_files.sh $(PYTHON_PROTOS_OUTPUT_DIR )
30+
31+ generate_golang_protos : clean install_golang_requirements
32+ mkdir $(GOLANG_PROTOS_OUTPUT_DIR )
33+ find $(PROTOS_DIR ) -name " *.proto" \
34+ -exec protoc \
35+ -I./protos \
36+ --go_out=$(GOLANG_PROTOS_OUTPUT_DIR ) \
37+ --go-grpc_out=$(GOLANG_PROTOS_OUTPUT_DIR ) {} \;
You can’t perform that action at this time.
0 commit comments