diff options
author | Carl Baldwin <carl@ecbaldwin.net> | 2019-11-06 17:30:23 +0000 |
---|---|---|
committer | Carl Baldwin <carl@ecbaldwin.net> | 2019-11-06 17:59:21 +0000 |
commit | 72a0e55287bd2ebffe2a1e6d4a0f24fe304b21ee (patch) | |
tree | d33ff8c929c6be099d44c5c738e9d225852a2dab /tools | |
parent | a42a1a5f6bf0d0aa8dac26d32907b94b7cdcc6e1 (diff) |
Use correct import paths for protobuf packages
The packages `any`, `empty`, and `timestamp` ship with protoc so there
is no need to pull them out of the go package. This simplifies the
generation script and also corrects the import paths for the standard
protobuf types.
Fixes: #2095
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/grpc/genproto.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/grpc/genproto.sh b/tools/grpc/genproto.sh index 28b3497e..e82320eb 100755 --- a/tools/grpc/genproto.sh +++ b/tools/grpc/genproto.sh @@ -1,9 +1,10 @@ -#!/usr/bin/env bash -x +#!/usr/bin/env bash # stolen from prometheus # # Generate all protobuf bindings. # Run from repository root. +set -x set -e set -u @@ -26,9 +27,7 @@ for pkg in ${INSTALL_PKGS}; do done GOBGP="${PWD}" -GOPROTO="$(GO111MODULE=on go list -f '{{ .Dir }}' -m github.com/golang/protobuf)" echo "generating code" -protoc -I "${GOPROTO}"/ptypes \ - -I "${GOBGP}"/api \ +protoc -I "${GOBGP}"/api \ --go_out=plugins=grpc:${GOBGP}/api "${GOBGP}"/api/*.proto |