update make to generate proto2 and proto3

This commit is contained in:
Victor Shyba 2019-02-26 18:20:56 -03:00 committed by Lex Berezhny
parent 9d0d17b422
commit 378ec44f3c

View file

@ -1,6 +1,9 @@
build:
rm proto/* -rf
cd proto && protoc --python_out=. -I ../../../../types/proto/ ../../../../types/proto/*.proto
sed -e 's/^import\ \(.*\)_pb2\ /from . import\ \1_pb2\ /g' -i proto/*.py
touch proto/__init__.py
rm proto2/* proto3/* -rf
cd proto2 && protoc --python_out=. -I ../../../../types/proto/v1/ ../../../../types/proto/v1/*.proto
sed -e 's/^import\ \(.*\)_pb2\ /from . import\ \1_pb2\ /g' -i proto2/*.py
touch proto2/__init__.py
cd proto3 && protoc --python_out=. -I ../../../../types/proto/v2/ ../../../../types/proto/v2/*.proto
sed -e 's/^import\ \(.*\)_pb2\ /from . import\ \1_pb2\ /g' -i proto3/*.py
touch proto3/__init__.py