Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix protobuf headers check. #5381

Merged
merged 1 commit into from
May 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions protos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ copy-protos:
regenerate: copy-protos check clean
@protoc \
--proto_path=/usr/local/include \
--proto_path=/usr/include \
--proto_path=${PROTO_PATH} \
--gofast_out=plugins=grpc,Mapi.proto=${DGO_PATH}/protos/api:pb \
pb.proto
Expand Down
10 changes: 6 additions & 4 deletions protos/depcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ function CompareSemVer() {
}

function CheckProtobufIncludes() {
echo -n "Checking for directory /usr/local/include/google/protobuf... "
if [ ! -d /usr/local/include/google/protobuf ]; then
echo -n "Checking for directory /usr/include/google/protobuf or /usr/local/include/google/protobuf... "
if !([ -d /usr/include/google/protobuf ] || [ -d /usr/local/include/google/protobuf ]) ; then
echo "FAIL" >&2
echo "Missing protobuf types in /usr/local/include/google/protobuf: directory not found" >&2
echo "Download and install protoc and the protobuf types from protobuf releases page:" >&2
echo "Missing protobuf headers in /usr/include/google/protobuf or /usr/local/include/google/protobuf:" \
"directory not found." >&2
echo "Download and install protoc and the protobuf headers by installing protoc via a package manager" \
"or downloading it from the protobuf releases page:" >&2
echo "https://github.com/protocolbuffers/protobuf/releases/" >&2
exit 1
fi
Expand Down