#!/usr/bin/env bash
# Compila todos los .proto en proto/ y deposita los stubs en app/grpc/generated/
set -e

PROTO_SRC="proto"
PROTO_OUT="app/grpc/generated"

python -m grpc_tools.protoc \
  -I "$PROTO_SRC" \
  --python_out="$PROTO_OUT" \
  --grpc_python_out="$PROTO_OUT" \
  "$PROTO_SRC"/*.proto

echo "Stubs generados en $PROTO_OUT"
