This repository has been archived on 2026-07-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
disaster-control/tools/sync-mirror.sh
tegwick e7aa485c9f Complete DISCTL-WP-0002-T01: Forgejo off-Gitea mirror
Create private coulomb/disaster-control on forgejo.coulomb.social,
add mirror sync docs and tools/sync-mirror.sh, update registers and
README. Mark T01 done.
2026-07-07 20:28:58 +02:00

16 lines
537 B
Bash
Executable File

#!/usr/bin/env bash
# Push current branch to the off-Gitea Forgejo mirror (R10).
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${ROOT}"
if ! git remote get-url mirror &>/dev/null; then
echo "mirror remote missing — run: git remote add mirror forgejo-remote:coulomb/disaster-control.git" >&2
exit 1
fi
BRANCH="${1:-$(git branch --show-current)}"
echo "==> Pushing ${BRANCH} to mirror (forgejo-remote:coulomb/disaster-control.git)"
git push mirror "${BRANCH}" --tags
echo "==> Mirror sync complete"