fix(vps): migrate Dawnforger GitHub Fractured remote to Gitea

Production origin used github.com:Dawnforger/Fractured; extend auto-migration
to match that legacy mirror (and tighten regex to repo name suffix).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-13 13:27:47 -04:00
parent 310bff4e06
commit 3568a580aa
+7 -6
View File
@@ -23,9 +23,9 @@
# bash scripts/vps-update-server.sh --run-after 'custom command here'
#
# Canonical Fractured source (Gitea): https://git.hisora.dev/HighSocietyRaiding/Fractured.git
# If this clone still has github.com/HighSocietyRaiding/Fractured on the pull remote, the script
# rewrites that remote URL to Gitea before pulling (override with FRACTURED_GITEA_ORIGIN_URL;
# disable with FRACTURED_SKIP_ORIGIN_MIGRATION=1).
# If origin still points at a known legacy GitHub mirror (HighSocietyRaiding/Fractured or
# Dawnforger/Fractured), the script rewrites that remote to Gitea before pulling (override with
# FRACTURED_GITEA_ORIGIN_URL; disable with FRACTURED_SKIP_ORIGIN_MIGRATION=1).
#
# Environment:
# FRACTURED_GIT_REMOTE — remote name (default: origin)
@@ -188,7 +188,7 @@ current_branch() {
git symbolic-ref -q --short HEAD || git rev-parse --short HEAD
}
# Old VPS clones may still have origin → github.com/HighSocietyRaiding/Fractured; repoint to Gitea.
# Old VPS clones may still have origin → github.com:…/Fractured (org mirror); repoint to Gitea.
ensure_fractured_origin_on_gitea() {
if [[ "${FRACTURED_SKIP_ORIGIN_MIGRATION:-0}" == "1" ]]; then
return 0
@@ -196,8 +196,9 @@ ensure_fractured_origin_on_gitea() {
local url
url="$(git remote get-url "$GIT_REMOTE" 2>/dev/null || true)"
[[ -z "$url" ]] && return 0
if [[ "$url" =~ github\.com[:/]HighSocietyRaiding/Fractured ]]; then
echo "==> $GIT_REMOTE still points at GitHub Fractured; switching to Gitea: $FRACTURED_GITEA_ORIGIN_URL"
# HTTPS: …/Org/Fractured or …/Fractured.git SSH: github.com:Org/Fractured(.git)
if [[ "$url" =~ github\.com[:/](HighSocietyRaiding|Dawnforger)/Fractured(\.git)?$ ]]; then
echo "==> $GIT_REMOTE still points at GitHub Fractured (${BASH_REMATCH[1]}); switching to Gitea: $FRACTURED_GITEA_ORIGIN_URL"
run git remote set-url "$GIT_REMOTE" "$FRACTURED_GITEA_ORIGIN_URL"
fi
}