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:
@ -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
|
||||
|
Reference in New Issue
Block a user