1
0
mirror of https://github.com/osrg/gobgp.git synced 2024-05-11 05:55:10 +00:00

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
This commit is contained in:
Carl Baldwin
2019-11-06 17:30:23 +00:00
parent a42a1a5f6b
commit 72a0e55287
5 changed files with 697 additions and 697 deletions

View File

@ -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