From 42da5b2c7f70e14a5da0033c2f2eed2a24b2a052 Mon Sep 17 00:00:00 2001 From: Jens Date: Tue, 28 Jul 2026 07:23:37 +0200 Subject: [PATCH] Make Tower deploy remote explicit --- backend/tests/test_sprint31_unraid_template.py | 1 + scripts/deploy_tower.ps1 | 6 +++++- scripts/deploy_tower.sh | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/backend/tests/test_sprint31_unraid_template.py b/backend/tests/test_sprint31_unraid_template.py index cd524a48..86e8088a 100644 --- a/backend/tests/test_sprint31_unraid_template.py +++ b/backend/tests/test_sprint31_unraid_template.py @@ -137,6 +137,7 @@ def test_tower_deploy_uses_single_container_unraid_compose() -> None: for script in (powershell, bash): assert "bash deploy/unraid/deploy-release.sh" in script assert "git clean -fd -- backend frontend deploy scripts fixtures tests contracts demo" in script + assert 'git remote set-url origin "$REMOTE_REPO"' in script assert "docker compose -f docker-compose.unraid.yml config" in release_script assert "--build-arg GEOINTEL_INSTALL_AI=" in release_script diff --git a/scripts/deploy_tower.ps1 b/scripts/deploy_tower.ps1 index a9a76776..87969140 100644 --- a/scripts/deploy_tower.ps1 +++ b/scripts/deploy_tower.ps1 @@ -28,7 +28,11 @@ if [ ! -d .git ]; then git remote add origin "$REMOTE_REPO" fi -git remote get-url origin >/dev/null 2>&1 || git remote add origin "$REMOTE_REPO" +if git remote get-url origin >/dev/null 2>&1; then + git remote set-url origin "$REMOTE_REPO" +else + git remote add origin "$REMOTE_REPO" +fi git fetch origin "$REMOTE_BRANCH" git reset --hard "origin/$REMOTE_BRANCH" git branch -M "$REMOTE_BRANCH" diff --git a/scripts/deploy_tower.sh b/scripts/deploy_tower.sh index c0f29847..56797f8b 100644 --- a/scripts/deploy_tower.sh +++ b/scripts/deploy_tower.sh @@ -32,6 +32,11 @@ if [[ ! -d .git ]]; then git remote add origin "$REMOTE_REPO" fi +if git remote get-url origin >/dev/null 2>&1; then + git remote set-url origin "$REMOTE_REPO" +else + git remote add origin "$REMOTE_REPO" +fi git fetch origin "$REMOTE_BRANCH" git checkout -B "$REMOTE_BRANCH" "origin/$REMOTE_BRANCH" # Remove only untracked source files that can enter the image. Persistent