#!/bin/bash
# Wild Dragon — Push to Forgejo
# Run this from the wild-dragon/ directory on a machine with git + network access to forge.wilddragon.net

set -e

REPO_URL="https://forge.wilddragon.net/zgaetano/wild-dragon.git"

echo "=== Wild Dragon — Pushing to Forgejo ==="

# Remove any existing .git (we'll init fresh and force push)
rm -rf .git

# Init and add remote
git init -b main
git remote add origin "$REPO_URL"

# Stage everything
git add -A

# Commit
git commit -m "feat: initial Wild Dragon platform scaffold

MAM core + SDI capture pipeline + worker + web UI.

Services:
- mam-api: Node/Express REST API with PostgreSQL
- capture: SDI capture daemon with dual-stream FFmpeg (HiRes + proxy)
- worker: BullMQ job processor (proxy gen, thumbnails, EDL conform)
- web-ui: Vanilla HTML/CSS/JS MAM browser + capture controls
- PostgreSQL 16 + Redis 7 via Docker Compose

Co-Authored-By: Claude <noreply@anthropic.com>"

# Force push (replaces the auto-init commit)
git push --force origin main

echo ""
echo "=== Done! Visit: https://forge.wilddragon.net/zgaetano/wild-dragon ==="
