fx build fix
Some checks failed
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx/1 Pipeline failed
ci/woodpecker/push/fx/2 Pipeline failed
ci/woodpecker/push/nats Pipeline was successful

This commit is contained in:
Stephan D
2025-11-08 03:34:12 +01:00
parent b6c795a0c8
commit 5c73106044

View File

@@ -7,16 +7,19 @@ 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 [ ! -f "${PROTOC_INCLUDE}/google/protobuf/timestamp.proto" ]; then
for candidate in /usr/include /usr/local/include /usr/lib/include /usr/local/share/include "$(dirname "$(command -v protoc)")/../include"; do
PROTOC_INCLUDE="${PROTOC_INCLUDE:-}"
if [ -z "${PROTOC_INCLUDE}" ]; then
PROTOC_INCLUDE="$("${PROTOC_BIN}" --print_include_path 2>/dev/null || true)"
fi
if [ -z "${PROTOC_INCLUDE}" ] || [ ! -f "${PROTOC_INCLUDE}/google/protobuf/timestamp.proto" ]; then
for candidate in /usr/include /usr/local/include /usr/lib/include /usr/local/share/include "$(dirname "${PROTOC_BIN}")/../include"; do
if [ -f "${candidate}/google/protobuf/timestamp.proto" ]; then
PROTOC_INCLUDE="${candidate}"
break
fi
done
fi
if [ ! -f "${PROTOC_INCLUDE}/google/protobuf/timestamp.proto" ]; then
if [ -z "${PROTOC_INCLUDE}" ] || [ ! -f "${PROTOC_INCLUDE}/google/protobuf/timestamp.proto" ]; then
echo "[proto] failed to locate google/protobuf well-known types; set PROTOC_INCLUDE" >&2
exit 1
fi