Files
FrenoCorp/scripts/setup.sh
Michael Freno 90c79eb6d4 FRE-4955 Review silent active run for Code Reviewer
- FRE-4955: 9th stale-run eval for Code Reviewer zombie run , marked false positive
- FRE-4954: Investigation of Code Reviewer adapter reliability closed as done. Root cause: no heartbeat/adapter config. Fix tracked in FRE-4956 (CEO)
- Broader CTO oversight: Senior Engineer bottleneck (19 in_review), Code Reviewer ghost runs awaiting FRE-4956

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-10 01:43:53 -04:00

69 lines
2.0 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Vercel Project Setup Script for AudiobookPipeline
# This script creates and configures the Vercel project
# Requires: VERCEL_TOKEN environment variable or `vercel login`
set -e
echo "🚀 Setting up Vercel project for AudiobookPipeline..."
# Check if Vercel CLI is installed
if ! npx vercel --version &> /dev/null; then
echo "📦 Installing Vercel CLI..."
npm install -g vercel
fi
VERCEL_CMD="npx vercel"
# Use VERCEL_TOKEN if available, otherwise require login
if [ -n "$VERCEL_TOKEN" ]; then
echo "🔐 Using VERCEL_TOKEN for authentication..."
export VERCEL_TOKEN
else
echo "🔐 Authenticating with Vercel..."
$VERCEL_CMD login
fi
# Create Vercel project
echo "📁 Creating Vercel project..."
PROJECT=$($VERCEL_CMD ls | grep -i audiobookpipeline || echo "")
if [ -z "$PROJECT" ]; then
$VERCEL_CMD init --name audiobookpipeline --framework vite
echo "✅ Project created successfully"
else
echo " Project already exists: $PROJECT"
fi
# Configure environment variables
echo "⚙️ Configuring environment variables..."
# Read from .env.local and set in Vercel
if [ -f ".env.local" ]; then
while IFS='=' read -r key value; do
# Skip comments and empty lines
[[ "$key" =~ ^#.*$ ]] && continue
[[ -z "$key" ]] && continue
# Remove any trailing whitespace
value=$(echo "$value" | xargs)
echo "Setting $key..."
$VERCEL_CMD env set "$key" "$value" --env production --override
$VERCEL_CMD env set "$key" "$value" --env development --override
$VERCEL_CMD env set "$key" "$value" --env preview --override
done < .env.local
echo "✅ Environment variables configured"
else
echo "⚠️ .env.local not found. Please create it with the required variables."
fi
# Deploy to verify configuration
echo "🚢 Testing deployment..."
$VERCEL_CMD deploy --prod --prebuilt
echo "✨ Vercel setup complete!"
echo "📎 View your deployment at: https://audiobookpipeline.vercel.app"