Context
dumber releases move to ermite (git.bnema.dev). The self-updater in
internal/infrastructure/updater/github.go only reads GitHub:
https://api.github.com/repos/bnema/dumber/releases/latesthttps://github.com/bnema/dumber/releases/latest/download/dumber_%s_%s.tar.gzhttps://github.com/bnema/dumber/releases/latest/download/checksums.txtvalidateDownloadURLonly allows the hostgithub.com
Until this ships, the release workflow also publishes each release on the GitHub mirror, so installed builds keep updating.
Change
- Check ermite first:
https://git.bnema.dev/-/github/api/repos/bnema/dumber/releases/latest(GitHub-compatible JSON, on one line). Fall back to GitHub on a network error, a non-2xx status, bad JSON or an emptytag_name. - Download from the source that answered, pinned to the tag:
https://git.bnema.dev/dumber/releases/download/<tag>/dumber_linux_x86_64.tar.gz. - Fetch
checksums.txtfrom the same source and tag as the archive. - Allow only https with the hosts
git.bnema.devandgithub.com, and no userinfo. - Report a transient failure only when every source failed transiently.
Done when
- A build with the new updater moves from one release to the next through ermite.
- With ermite down, it still updates from GitHub.
- Once most installs run that build, the GitHub copy of releases can stop: remove the
GitHub run of
.github/workflows/release.yml(addif: github.server_url != 'https://github.com').