From 6958d4aff0d67c855b18b1d5b2db8fcae3cd29a6 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 21 Oct 2025 07:41:49 +0000 Subject: [PATCH] Auto-configure rspade_upstream remote for end-user projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- bin/framework-pull-upstream.sh | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/bin/framework-pull-upstream.sh b/bin/framework-pull-upstream.sh index 6e15bb94b..967df192b 100755 --- a/bin/framework-pull-upstream.sh +++ b/bin/framework-pull-upstream.sh @@ -81,13 +81,27 @@ if [ -f ".env" ]; then fi fi -# Verify rspade_upstream remote exists +# Verify rspade_upstream remote exists, auto-configure for project mode if ! git remote get-url rspade_upstream >/dev/null 2>&1; then - echo "ERROR: Remote \"rspade_upstream\" not configured." - echo "" - echo "Configure the upstream remote:" - echo " git remote add rspade_upstream " - exit 1 + # Auto-configure remote for project mode (when system/ is a submodule) + if [ "$IS_PROJECT_MODE" = false ] && [ -f "../.gitmodules" ] && grep -q "path = system" ../.gitmodules 2>/dev/null; then + echo "→ Configuring rspade_upstream remote (first-time setup)..." + UPSTREAM_URL="ssh://git@privategit.hanson.xyz:3322/brianhansonxyz/rspade_system.git" + if git remote add rspade_upstream "$UPSTREAM_URL" 2>&1; then + echo " ✓ Remote configured: $UPSTREAM_URL" + echo "" + else + echo "ERROR: Failed to configure rspade_upstream remote." + exit 1 + fi + else + # Framework dev mode or can't auto-detect - require manual configuration + echo "ERROR: Remote \"rspade_upstream\" not configured." + echo "" + echo "Configure the upstream remote:" + echo " git remote add rspade_upstream " + exit 1 + fi fi echo ""