2023-08-07 21:30:30 +03:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
2023-08-09 14:31:23 +03:00
|
|
|
PROTO_ARGS=" \
|
2023-08-07 21:30:30 +03:00
|
|
|
--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 \
|
2023-08-09 14:31:23 +03:00
|
|
|
--go-micro_out=module=go.unistack.org/unistack-org/pkgdash/proto/go_generate,components=micro|http,standalone=true:./micro \
|
|
|
|
--validate_out=paths=source_relative,lang=go:go_generate
|
|
|
|
"
|
2023-08-07 21:30:30 +03:00
|
|
|
|
2023-08-10 13:05:17 +03:00
|
|
|
find . -not \( -name "*.sh" -or -name "*.proto" -or -name "generate.go" -or -name "Dockerfile" -or -name "Makefile" \) -delete
|
2023-08-09 14:31:23 +03:00
|
|
|
mkdir -p micro go_generate && \
|
|
|
|
protoc -I. $PROTO_ARGS ./*.proto || \
|
2023-08-10 13:05:17 +03:00
|
|
|
find . -not \( -name "*.sh" -or -name "*.proto" -or -name "generate.go" -or -name "Dockerfile" -or -name "Makefile" \) -delete
|