-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathdeploy-agents.sh
More file actions
56 lines (47 loc) · 1.46 KB
/
deploy-agents.sh
File metadata and controls
56 lines (47 loc) · 1.46 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/Users/bruzwj/Downloads/.env.local#!/bin/bash
# Deployment script for Supabase Edge Functions
# Run this when Docker is working properly
if [ -f .env.local ]; then
# Load environment variables, handling = signs and quotes properly
set -a
source .env.local
set +a
fi
echo "🚀 Deploying Supabase Edge Functions..."
# Debug: Check if variables are loaded
echo "Debug: SUPABASE_ACCESS_TOKEN is ${#SUPABASE_ACCESS_TOKEN} characters long"
echo "Debug: SUPABASE_PROJECT_REF = $SUPABASE_PROJECT_REF"
# Ensure variables are set
if [ -z "$SUPABASE_ACCESS_TOKEN" ]; then
echo "Error: SUPABASE_ACCESS_TOKEN not found in .env.local"
exit 1
fi
if [ -z "$SUPABASE_PROJECT_REF" ]; then
echo "Error: SUPABASE_PROJECT_REF not found in .env.local"
exit 1
fi
# Deploy all agent functions
agents=(
"agent-macro-analyst"
"agent-market-analyst"
"agent-news-analyst"
"agent-social-media-analyst"
"agent-fundamentals-analyst"
"agent-bull-researcher"
"agent-bear-researcher"
"agent-research-manager"
"agent-trader"
"agent-risky-analyst"
"agent-safe-analyst"
"agent-neutral-analyst"
"agent-risk-manager"
"analysis-portfolio-manager"
"rebalance-portfolio-manager"
"opportunity-agent"
)
echo "📦 Deploying agent functions..."
for agent in "${agents[@]}"; do
echo " 📦 Deploying $agent..."
SUPABASE_ACCESS_TOKEN=$SUPABASE_ACCESS_TOKEN npx supabase functions deploy $agent --project-ref $SUPABASE_PROJECT_REF
done
echo "✅ All functions deployed successfully!"