[#311] Rewrite make protoc target similarly to neofs-api-go
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
cd4055d0b7
commit
9050d41099
1 changed files with 2 additions and 4 deletions
6
Makefile
6
Makefile
|
@ -58,16 +58,14 @@ test_dep:
|
||||||
# Regenerate proto files:
|
# Regenerate proto files:
|
||||||
protoc:
|
protoc:
|
||||||
@GOPRIVATE=github.com/nspcc-dev go mod vendor
|
@GOPRIVATE=github.com/nspcc-dev go mod vendor
|
||||||
# Install specific version for gogo-proto
|
|
||||||
@go list -f '{{.Path}}/...@{{.Version}}' -m github.com/gogo/protobuf | xargs go get -v
|
|
||||||
# Install specific version for protobuf lib
|
# Install specific version for protobuf lib
|
||||||
@go list -f '{{.Path}}/...@{{.Version}}' -m github.com/golang/protobuf | xargs go get -v
|
@go list -f '{{.Path}}/...@{{.Version}}' -m github.com/golang/protobuf | xargs go get -v
|
||||||
# Protoc generate
|
# Protoc generate
|
||||||
@for f in `find . -type f -name '*.proto' -not -path './vendor/*'`; do \
|
@for f in `find . -type f -name '*.proto' -not -path './vendor/*'`; do \
|
||||||
echo "⇒ Processing $$f "; \
|
echo "⇒ Processing $$f "; \
|
||||||
protoc \
|
protoc \
|
||||||
--proto_path=.:./vendor:./vendor/github.com/nspcc-dev/neofs-api-go:/usr/local/include:./pkg/services/control \
|
--proto_path=.:./vendor:/usr/local/include \
|
||||||
--gofast_out=plugins=grpc,paths=source_relative:. $$f; \
|
--go_out=plugins=grpc,paths=source_relative:. $$f; \
|
||||||
done
|
done
|
||||||
rm -rf vendor
|
rm -rf vendor
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue