Files
wehub-resource-sync f36e2104d8
sep-tests / ragflow_preflight (push) Waiting to run
sep-tests / ragflow_tests_infinity (push) Blocked by required conditions
sep-tests / ragflow_tests_elasticsearch (push) Blocked by required conditions
tests / ragflow_preflight (push) Waiting to run
tests / ragflow_tests_infinity (push) Blocked by required conditions
tests / ragflow_tests_elasticsearch (push) Blocked by required conditions
chore: import upstream snapshot with attribution
2026-07-13 12:16:49 +08:00

52 lines
1.5 KiB
Bash
Executable File

echo "Generating protobuf and gRPC code..."
if ! command -v protoc &> /dev/null; then
echo "❌ protoc not found!"
echo "Please install protoc first:"
echo " - macOS: brew install protobuf"
echo " - Ubuntu: apt install protobuf-compiler"
echo " - Download: https://github.com/protocolbuffers/protobuf/releases"
exit 1
fi
echo "✅ protoc: $(which protoc)"
if ! command -v protoc-gen-go &> /dev/null; then
echo ""
echo "❌ protoc-gen-go not found!"
echo "Please install it:"
echo " go install google.golang.org/protobuf/cmd/protoc-gen-go@latest"
echo ""
echo "Or add Go bin to PATH:"
echo " export PATH=\$PATH:$(go env GOPATH)/bin"
exit 1
fi
echo "✅ protoc-gen-go: $(which protoc-gen-go)"
if ! command -v protoc-gen-go-grpc &> /dev/null; then
echo ""
echo "❌ protoc-gen-go-grpc not found!"
echo "Please install it:"
echo " go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest"
echo ""
echo "Or add Go bin to PATH:"
echo " export PATH=\$PATH:$(go env GOPATH)/bin"
exit 1
fi
echo "✅ protoc-gen-go-grpc: $(which protoc-gen-go-grpc)"
mkdir -p internal/common
protoc --go_out=internal/common \
--go-grpc_out=internal/common \
internal/proto/ingestion.proto
if [ $? -eq 0 ]; then
echo "✅ Generation successful!"
echo "Generated files:"
echo " - internal/common/ingestion.pb.go"
echo " - internal/common/ingestion_grpc.pb.go"
else
echo "❌ Generation failed!"
exit 1
fi