feat(raw-commit): introduce GENOME_PUSH_URL test seam

This commit is contained in:
Matteo Cherubini 2026-07-01 19:56:41 +02:00
parent 4f9fbdec8b
commit bf657c3708

View file

@ -28,7 +28,8 @@ set -a; . "${HOME}/.config/knowledge-genome.env"; set +a
vault="${GENOME_VAULTS_ROOT}/${genome}" vault="${GENOME_VAULTS_ROOT}/${genome}"
fid="${genome}-public" fid="${genome}-public"
authors_map="${GENOME_VAULTS_ROOT}/.authors.json" authors_map="${GENOME_VAULTS_ROOT}/.authors.json"
clone_url="http://${FORGEJO_USER}@${FORGEJO_HOST}/${FORGEJO_OWNER}/${genome}.git" # GENOME_PUSH_URL is a test seam: defaults to the Forgejo loopback URL in production.
clone_url="${GENOME_PUSH_URL:-http://${FORGEJO_USER}@${FORGEJO_HOST}/${FORGEJO_OWNER}/${genome}.git}"
export GIT_ASKPASS=/usr/local/bin/genome-askpass export GIT_ASKPASS=/usr/local/bin/genome-askpass
[[ -d "${vault}/.git" ]] || { printf '{"status":"error","reason":"vault absent","genome":"%s"}\n' "$genome"; exit 1; } [[ -d "${vault}/.git" ]] || { printf '{"status":"error","reason":"vault absent","genome":"%s"}\n' "$genome"; exit 1; }