Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into feature/133195821_…
…bobuhl_add_stream_service_&_calls_to_msg Conflicts: Makefile category.pb.go dataset.pb.go query_result.pb.go seed_result.pb.go status.pb.go stream.pb.go stream_result.pb.go stream_result.proto zvelo_api.pb.go
- Loading branch information
Showing
15 changed files
with
470 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,48 @@ | ||
PROTO_FILES=$(wildcard *.proto) | ||
GO_PB_FILES=$(patsubst %.proto,%.pb.go,$(PROTO_FILES)) | ||
PY_PB_FILES=$(patsubst %.proto,%_pb2.py,$(PROTO_FILES)) | ||
PROTO_FILES := $(wildcard *.proto) | ||
GO_PB_FILES := $(patsubst %.proto,%.pb.go,$(PROTO_FILES)) | ||
PY_PB_FILES := $(patsubst %.proto,%_pb2.py,$(PROTO_FILES)) | ||
FIRST_GOPATH := $(firstword $(subst :, ,$(GOPATH))) | ||
|
||
default: go | ||
go: $(GO_PB_FILES) | ||
python: $(PY_PB_FILES) | ||
|
||
define wrap-cmd | ||
@rm -f ../../zvelo | ||
@ln -sf zvelo.io ../../zvelo | ||
cd ../.. && $(1) | ||
@rm -f ../../zvelo | ||
endef | ||
|
||
define wrap-protoc | ||
protoc \ | ||
-I. \ | ||
-I$(FIRST_GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ | ||
$(1) | ||
endef | ||
|
||
define protoc-go | ||
--go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:. \ | ||
$(patsubst %,zvelo/msg/%,$(PROTO_FILES)) | ||
endef | ||
|
||
define protoc-python | ||
python \ | ||
-m grpc.tools.protoc \ | ||
--python_out=. \ | ||
--grpc_python_out=. \ | ||
-I. \ | ||
-I$(FIRST_GOPATH)/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \ | ||
$(patsubst %,zvelo/msg/%,$(PROTO_FILES)) | ||
endef | ||
|
||
$(GO_PB_FILES): %.pb.go: %.proto | ||
rm -f ../../zvelo | ||
ln -sf zvelo.io ../../zvelo | ||
cd ../.. && protoc --go_out=plugins=grpc:. $(patsubst %,zvelo/msg/%,$(PROTO_FILES)) | ||
rm -f ../../zvelo | ||
$(call wrap-cmd,$(call wrap-protoc,$(protoc-go))) | ||
|
||
$(PY_PB_FILES): %_pb2.py: %.proto | ||
rm -f ../../zvelo | ||
ln -sf zvelo.io ../../zvelo | ||
cd ../.. && python -m grpc.tools.protoc --python_out=. --grpc_python_out=. -I. $(patsubst %,zvelo/msg/%,$(PROTO_FILES)) | ||
rm -f ../../zvelo | ||
$(call wrap-cmd,$(protoc-python)) | ||
|
||
clean: | ||
rm -rf $(GO_PB_FILES) $(PY_PB_FILES) | ||
|
||
.PHONY: default go python | ||
.PHONY: default clean go python |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package msg; | ||
package zvelo.msg; | ||
|
||
option go_package = "zvelo.io/msg"; | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package msg; | ||
package zvelo.msg; | ||
|
||
option go_package = "zvelo.io/msg"; | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package msg; | ||
package zvelo.msg; | ||
|
||
option go_package = "zvelo.io/msg"; | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
syntax = "proto3"; | ||
|
||
package msg; | ||
package zvelo.msg; | ||
|
||
option go_package = "zvelo.io/msg"; | ||
|
||
|
Oops, something went wrong.