uber / prototool

Your Swiss Army Knife for Protocol Buffers
MIT License
5.04k stars 345 forks source link

substitute environment variables in config files #572

Open DoubleDi opened 3 years ago

DoubleDi commented 3 years ago

Hi! This PR fixes #529 #498.

The current protoc shell cmd:

protoc -I=. -I${GOPATH}/src -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:../pkg/server --grpc-gateway_out=logtostderr=true:../pkg/server --openapiv2_out=. server.proto

The analog prototool.yml:

protoc:
  version: 3.11.0
  includes:
    - ".."
    - ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis
    - ${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway
 ...

There is also a way to vendor the deps using go mod vendor. But unfortunately the .proto imported files do not get vendored.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.