16 lines
537 B
Bash
16 lines
537 B
Bash
|
|
#!/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"
|