#!/usr/bin/env bash set -euo pipefail # Helper script that pushes the current branch to the Gitea remote using a personal # access token stored in $GITEA_TOKEN. Keeps the token out of shell history. if [[ -z "${GITEA_TOKEN:-}" ]]; then echo "Missing GITEA_TOKEN (export it before running this script)." >&2 exit 1 fi readonly REMOTE_URL="https://truetype:${GITEA_TOKEN}@gitea.solarpi.net/truetype/dashgradio_tunnel.git" readonly BRANCH="${1:-main}" echo "Pushing branch ${BRANCH} to Gitea..." git push "${REMOTE_URL}" "${BRANCH}"