pkgdash/generate.sh
Vasiliy Tolstov 2ef12956ac initial rewrite, use micro v4 and not cms-xxx stuff
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
2023-08-11 21:27:38 +03:00

12 lines
513 B
Bash
Executable File

#!/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/v4) \
--go_out=paths=source_relative:./proto \
--go-micro_out=paths=source_relative,components=micro|http,standalone=false:./proto \
--validate_out=paths=source_relative,lang=go:./proto
"
find ./proto -type f -name "*.pb.go" -delete
protoc -I./proto $PROTO_ARGS ./proto/*.proto || find ./proto -type f -name "*.pb.go" -delete