Merge branch 'staging' of https://github.com/useautumn/autumn into staging

This commit is contained in:
John Yeo
2025-10-01 11:46:42 +01:00
2 changed files with 86 additions and 0 deletions

80
conductor-setup.sh Normal file
View File

@@ -0,0 +1,80 @@
#!/bin/zsh
set -e
echo "🚀 Starting Conductor workspace setup for Autumn..."
# Check for Bun
if ! command -v bun &> /dev/null; then
echo "❌ Error: Bun is not installed."
echo "Please install Bun from https://bun.sh"
exit 1
fi
echo "✅ Bun found: $(bun --version)"
# Determine root path - use CONDUCTOR_ROOT_PATH if set, otherwise use git root
if [ -n "$CONDUCTOR_ROOT_PATH" ]; then
ROOT_PATH="$CONDUCTOR_ROOT_PATH"
else
# Fallback for manual testing - go up two directories from .conductor/workspace
ROOT_PATH="$(cd "$(dirname "$0")/../.." && pwd)"
fi
echo "📂 Root path: $ROOT_PATH"
# Install dependencies
echo "📦 Installing dependencies..."
bun install
# Copy .env files from root repo
echo "📋 Copying .env files from root repository..."
if [ -f "$ROOT_PATH/server/.env" ]; then
mkdir -p server
cp "$ROOT_PATH/server/.env" server/.env
echo "✅ Copied server/.env"
else
echo "⚠️ Warning: $ROOT_PATH/server/.env not found"
fi
if [ -f "$ROOT_PATH/vite/.env" ]; then
mkdir -p vite
cp "$ROOT_PATH/vite/.env" vite/.env
echo "✅ Copied vite/.env"
else
echo "⚠️ Warning: $ROOT_PATH/vite/.env not found"
fi
if [ -f "$ROOT_PATH/shared/.env" ]; then
mkdir -p shared
cp "$ROOT_PATH/shared/.env" shared/.env
echo "✅ Copied shared/.env"
else
echo "⚠️ Warning: $ROOT_PATH/shared/.env not found"
fi
# Copy drizzle migration files
if [ -d "$ROOT_PATH/shared/drizzle" ]; then
echo "📋 Copying database migration files..."
mkdir -p shared/drizzle
cp -r "$ROOT_PATH/shared/drizzle/"* shared/drizzle/
echo "✅ Copied migration files"
fi
# Build shared workspace (required for other workspaces)
echo "🔨 Building shared workspace..."
bun -F @autumn/shared build
# Run database migrations if DATABASE_URL exists
if grep -q "DATABASE_URL=" server/.env 2>/dev/null; then
echo "🗄️ Running database migrations..."
bun db:migrate
echo "✅ Database migrations complete"
else
echo "⚠️ Skipping database migrations (no DATABASE_URL found)"
fi
echo "🎉 Workspace setup complete!"
echo ""
echo "Next: Click the 'Run' button to start the development server"

6
conductor.json Normal file
View File

@@ -0,0 +1,6 @@
{
"scripts": {
"setup": "zsh conductor-setup.sh",
"run": "bun run dev:bun"
}
}