cms-template-proto/generate.sh

14 lines
508 B
Bash
Raw Normal View History

#!/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-micro_out=module=go.unistack.org/cms-template-proto,components=micro|grpc,standalone=true:./micro \
--validate_out=paths=source_relative,lang=go:."
export PATH=$(pwd)/bin:$PATH
export GOWORK=off
rm -rf micro *.pb.go *.pb.*.go
mkdir -p micro
protoc -I. $PROTO_ARGS ./*.proto