pkgdash/proto/generate.sh

12 lines
506 B
Bash
Raw Normal View History

2023-08-07 21:30:30 +03:00
#!/bin/sh -ex
PROTO_ARGS=" \
--proto_path=$(go list -f '{{ .Dir }}' -m github.com/envoyproxy/protoc-gen-validate) \
--proto_path=$(go list -f '{{ .Dir }}' -m go.unistack.org/micro-proto/v3) \
--go_out=paths=source_relative:go_generate \
--go-micro_out=module=go.unistack.org/unistack-org/pkgdash/proto/go_generate,components=micro|grpc,standalone=true:./micro \
--validate_out=paths=source_relative,lang=go:go_generate"
rm -rf micro go_generate
mkdir -p micro go_generate
protoc -I. $PROTO_ARGS ./*.proto