From a559dea353118408b9168c26b4712105a2897c3b Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Tue, 30 Sep 2025 14:08:08 +0100 Subject: [PATCH 1/2] Add Conductor workspace configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set up conductor.json with setup and run scripts for Autumn project. The setup script handles dependency installation, .env file copying, database migrations, and shared workspace building. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- conductor-setup.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++++ conductor.json | 6 ++++ 2 files changed, 86 insertions(+) create mode 100644 conductor-setup.sh create mode 100644 conductor.json diff --git a/conductor-setup.sh b/conductor-setup.sh new file mode 100644 index 000000000..46e8f7744 --- /dev/null +++ b/conductor-setup.sh @@ -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" \ No newline at end of file diff --git a/conductor.json b/conductor.json new file mode 100644 index 000000000..4841d7d93 --- /dev/null +++ b/conductor.json @@ -0,0 +1,6 @@ +{ + "scripts": { + "setup": "./conductor-setup.sh", + "run": "bun run dev:bun" + } +} \ No newline at end of file From 1d426df4b4d3d220b5154cc3ce85740a807ac1f8 Mon Sep 17 00:00:00 2001 From: amianthus <49116958+SirTenzin@users.noreply.github.com> Date: Tue, 30 Sep 2025 14:10:49 +0100 Subject: [PATCH 2/2] Use explicit zsh command for conductor-setup.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents permission denied errors by explicitly invoking zsh instead of relying on execute permissions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- conductor.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conductor.json b/conductor.json index 4841d7d93..839cdcfa4 100644 --- a/conductor.json +++ b/conductor.json @@ -1,6 +1,6 @@ { "scripts": { - "setup": "./conductor-setup.sh", + "setup": "zsh conductor-setup.sh", "run": "bun run dev:bun" } } \ No newline at end of file