diff --git a/ci/scripts/proto/generate.sh b/ci/scripts/proto/generate.sh index 8bb4477..be6440f 100755 --- a/ci/scripts/proto/generate.sh +++ b/ci/scripts/proto/generate.sh @@ -7,6 +7,7 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/../../.." && pwd)" API_DIR="${REPO_ROOT}/api" PROTO_DIR="./proto" PROTOC_BIN="${PROTOC:-protoc}" +PROTOC_INCLUDE="${PROTOC_INCLUDE:-/usr/include}" if ! command -v "${PROTOC_BIN}" >/dev/null 2>&1; then echo "[proto] protoc binary not found" >&2 @@ -30,6 +31,7 @@ generate_go() { shift mkdir -p "${out_dir}" "${PROTOC_BIN}" \ + -I="${PROTOC_INCLUDE}" \ -I="${PROTO_DIR}" \ --go_out="${out_dir}" \ --go_opt=paths=source_relative \ @@ -41,6 +43,7 @@ generate_go_with_grpc() { shift mkdir -p "${out_dir}" "${PROTOC_BIN}" \ + -I="${PROTOC_INCLUDE}" \ -I="${PROTO_DIR}" \ --go_out="${out_dir}" \ --go_opt=paths=source_relative \