Files
gotosocial/scripts/sync-upstream-forks.sh
estorozhenko 5733bbb285 feat(forks+netrules): форки upstream для локализации GtS/Phanpy + феда через vps02
- scripts/sync-upstream-forks.sh: mirror gts/phanpy upstream → gitverse (kpa39l/gotosocial-ru, phanpy-ru)
- scripts/apply-net-rules.sh + systemd/apply-gts-net-rules.service: policy-route 172.29.0.0/16 через WG vps02 (10.8.0.4) — стабильная федерация
- probe/push скрипты для gitverse (fork creation, mirror push)
- docs/i18n-analysis-ru.md: анализ русификации
- openspec change setup-upstream-forks (proposal/spec/tasks)
- .gitignore: forks/ (bare-зеркала 700M) + docker-compose.yml.bak-*
2026-10-03 06:01:05 +00:00

30 lines
1.4 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# sync-upstream-forks.sh — обновление локальных mirror-форков из upstream
# Использование: bash sync-upstream-forks.sh [--push]
# (без --push: только fetch; с --push: дополнительно push в gitverse)
# Локальные mirror'ы: /opt/gotosocial/forks/{gts,phanpy}-upstream.git
# Целевые gitverse-репо: kpa39l/gotosocial-ru, kpa39l/phanpy-ru
set -euo pipefail
FORKS=/opt/gotosocial/forks
PUSH="${1:-}"
sync_one() {
local dir="$1" name="$2" upstream="$3" gv="$4"
echo "=== $name: fetch upstream ==="
GIT_TERMINAL_PROMPT=0 git --git-dir="$FORKS/$dir" fetch origin --prune 2>&1 | tail -3
if [ "$PUSH" = "--push" ]; then
echo "=== $name: push в gitverse ==="
git --git-dir="$FORKS/$dir" push --mirror gitverse 2>&1 | tail -5
fi
echo "--- $name текущий main: $(git --git-dir="$FORKS/$dir" log -1 --format='%h %ad %s' --date=short main 2>/dev/null || echo 'нет main')"
}
sync_one gts-upstream.git "GoToSocial" \
"https://codeberg.org/superseriousbusiness/gotosocial.git" \
"git@gitverse.ru:kpa39l/gotosocial-ru.git"
sync_one phanpy-upstream.git "Phanpy" \
"https://github.com/cheeaun/phanpy.git" \
"git@gitverse.ru:kpa39l/phanpy-ru.git"
echo "Готово. Форки синхронизированы: $([ "$PUSH" = "--push" ] && echo 'с push в gitverse' || echo 'только fetch (push: --push)')"