12 lines
513 B
Bash
Executable File
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 |