fix: auto-migrate git remote from github to git.cutos.ai on install/update; bump v1.2.2

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
stswangzhiping
2026-05-04 17:36:24 +08:00
parent f71d448047
commit f1c24f75b5
3 changed files with 94 additions and 80 deletions

View File

@@ -23,6 +23,13 @@ fi
cd "$REPO_DIR"
# 如果 remote 仍指向 GitHub迁移到 git.cutos.ai
CURRENT_REMOTE=$(git remote get-url "$REMOTE" 2>/dev/null || echo "")
if echo "$CURRENT_REMOTE" | grep -q "github.com"; then
echo "==> Migrating remote from GitHub to git.cutos.ai ..."
git remote set-url "$REMOTE" https://git.cutos.ai/claw-daemon/clawd.git
fi
echo "==> Fetching latest from $REMOTE/$BRANCH ..."
git fetch "$REMOTE"