File size: 1,063 Bytes
059ec0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
# ─────────────────────────────────────────────────────────────
# Render Build Script – MicProtocol Monorepo
# Called by each Render service with SERVICE_NAME env var.
# Installs workspace deps from root, then builds the target.
# ─────────────────────────────────────────────────────────────
set -euo pipefail

SERVICE="${1:-${SERVICE_NAME:-}}"
if [ -z "$SERVICE" ]; then
  echo "Usage: SERVICE_NAME=@micprotocol/api bash scripts/render-build.sh"
  echo "       or: bash scripts/render-build.sh @micprotocol/api"
  exit 1
fi

echo "β†’ Render build for: $SERVICE"
echo "β†’ Installing workspace dependencies..."

corepack enable
pnpm install --frozen-lockfile --filter "$SERVICE" --filter "$SERVICE"^...

echo "β†’ Building $SERVICE..."
pnpm --filter "$SERVICE" build

echo "β†’ Build complete."