fix: repair Gitea mirror sync

pull/12/head
Vernon Keenan 2026-07-22 18:15:00 +00:00
parent 58ebde8660
commit 8f853d056d
2 changed files with 7 additions and 9 deletions

View File

@ -19,8 +19,8 @@ pins the same module, a `lib` bump is a constellation-wide rebuild (KV-C6a).
`plex`, `render`, `research`, `sf-gate`, `stash`) pins an explicit
`code.tnxs.net/vernonkeenan/lib` tag in its own `go.mod`; consumption is a
per-consumer `go.mod` bump, never automatic.
- Distribution is via a world-readable Gitea pull-mirror at
`code.tnxs.net/vernonkeenan/lib` (and `work/lib`), enabling
- Distribution is via the world-readable Gitea pull-mirror at
`code.tnxs.net/vernonkeenan/lib`, enabling
credential-free `go get code.tnxs.net/vernonkeenan/lib@vX.Y.Z` from
Docker/CI/dev boxes even though the GitHub repo itself is private
(ADR-KV-014). Everything committed here is treated as **published,
@ -128,11 +128,8 @@ service's own README for its file name and required keys.
3. Runs `go build ./...` and `go vet ./...` as a last sanity check.
4. Creates an annotated tag at HEAD, pushes it, and runs `gh release
create` with generated notes.
5. POSTs to the Gitea mirror-sync API for `vernonkeenan/lib` and
`work/lib` (skipped with a warning if `GITEA_TOKEN` is unset — there is
no existing Gitea/tnxs token variable defined anywhere on this
workstation today; `GITEA_TOKEN` is a new name, not a rename of
something already in use).
5. POSTs an explicit zero-length body to the Gitea mirror-sync API for
`vernonkeenan/lib` (skipped with a warning if `GITEA_TOKEN` is unset).
`make release-dry-run VERSION=vX.Y.Z` runs steps 1-3 and prints what
steps 4-5 would do, without tagging, pushing, publishing, or syncing

View File

@ -28,7 +28,7 @@
# rosetta.env, wdwai.env); GITEA_TOKEN is a new variable name
# introduced by this script, not a rename of an existing one.
# GITEA_MIRRORS Space-separated "owner/repo" mirror list (default
# "vernonkeenan/lib work/lib").
# "vernonkeenan/lib").
#
set -euo pipefail
@ -38,7 +38,7 @@ REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
SWAGGER_VERSION="${SWAGGER_VERSION:-v0.35.0}"
GITHUB_REPO="${GITHUB_REPO:-vernonkeenan/lib}"
GITEA_BASE_URL="${GITEA_BASE_URL:-https://code.tnxs.net/api/v1}"
GITEA_MIRRORS="${GITEA_MIRRORS:-vernonkeenan/lib work/lib}"
GITEA_MIRRORS="${GITEA_MIRRORS:-vernonkeenan/lib}"
# Sibling service repos this ritual pulls specs from, and the go-swagger
# generate flags the README's `make swagger` target used to run inline.
@ -329,6 +329,7 @@ gitea_mirror_sync() {
repo="${mirror##*/}"
log "Gitea mirror-sync: ${mirror}"
status="$(curl -sS -o /dev/null -w '%{http_code}' -X POST \
--data '' \
-H "Authorization: token ${GITEA_TOKEN}" \
"${GITEA_BASE_URL}/repos/${owner}/${repo}/mirror-sync")"
if [[ "$status" != "200" ]]; then