From 78c524020ee2dbac6f916602e82383da75d7d25b Mon Sep 17 00:00:00 2001 From: zgaetano Date: Tue, 31 Mar 2026 15:29:55 -0400 Subject: [PATCH] Add PUSH_TO_GIT.sh --- PUSH_TO_GIT.sh | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 PUSH_TO_GIT.sh diff --git a/PUSH_TO_GIT.sh b/PUSH_TO_GIT.sh new file mode 100644 index 0000000..779c38f --- /dev/null +++ b/PUSH_TO_GIT.sh @@ -0,0 +1,64 @@ +#!/bin/bash +# Run this script from the project root to initialize git and push to Forgejo + +set -e + +PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +cd "$PROJECT_DIR" + +echo "🚀 Initializing git repository and pushing to Forgejo…" + +# Configure git locally +git init +git config user.email "zgaetano@wilddragon.net" +git config user.name "Zac" + +# Create .gitignore +cat > .gitignore << 'EOF' +# Dependencies +node_modules/ +backend/vendor/ + +# Build outputs +dist/ +backend/cmd/moonrelay/ui/ +*.exe + +# Local state +.env +.DS_Store +.vscode/ +*.swp + +# Docker +Dockerfile (build artifacts) + +# Tailscale state (shouldn't be committed) +tsnet/ +EOF + +# Add everything and commit +git add -A +git commit -m "Initial commit: Moonlight Relay — Docker app with Go backend + React frontend + +- Go backend: embedded Tailscale (tsnet), mDNS host discovery, REST API +- React frontend: Vite + TypeScript, Tailwind CSS +- Docker Compose: multi-stage build, ready for TrueNAS SCALE +- Embedded SPA: React build baked into the Go binary via go:embed + +Co-Authored-By: Claude Haiku 4.5 " + +# Add Forgejo remote (adjust URL to match your instance) +# Example: FORGEJO_HOST=git.example.com FORGEJO_USER=your-username +read -p "Forgejo host (e.g., git.wilddragon.net): " FORGEJO_HOST +read -p "Forgejo username: " FORGEJO_USER + +REMOTE_URL="https://${FORGEJO_HOST}/${FORGEJO_USER}/moonlight-relay.git" +git remote add origin "$REMOTE_URL" + +echo "" +echo "Next steps:" +echo "1. Create the repo on your Forgejo instance (if not already done)" +echo "2. Run: git push -u origin main" +echo "" +echo "Remote URL: $REMOTE_URL"