feat(launcher): Gitea-backed alpha update feed replaces the GitHub Releases source

The launcher reported "no client available" because its update source was
pinned to a GitHub Releases manifest in a PRIVATE repo — nothing anonymous
could ever be fetched from it. Switch the feed to the PUBLIC Gitea repo so a
friend needs no account, and add the two commands that publish it.

- ReleaseManifestClient.ProductionManifestUri now points at
  git.snakedesert.se/erik/acdream raw on the `dist` branch. No update
  machinery changed: the existing strict reader already accepts any HTTPS
  manifest, so this is a URL swap plus a build script.

- tools/publish-bin.ps1 publishes the payloads into /bin and writes
  bin/manifest.json (schema v1, SHA-256 + size per artifact):
    client-win-x64.zip    AcDream.App + acdream-headless
    launcher-win-x64.zip  acdream-launcher + co-deployed acdream-bake
  Stamps InformationalVersion ONLY — never -p:Version, which also rewrites
  project-reference versions inside the committed packages.<rid>.lock.json
  files and churned every one of them with a throwaway build stamp.

- tools/publish-dist.ps1 pushes /bin to the Gitea-only `dist` branch from a
  throwaway worktree, leaving the developer's checkout, index, and HEAD
  untouched. It refuses a GitHub remote outright.

Why `dist` and not main: the launcher payload is ~103 MB because the launcher
and its co-deployed bake CLI are each self-contained single files (deliberate,
see AcDream.Launcher.csproj). GitHub hard-rejects files over 100 MB, and all
three refs currently track main, so payloads on main would break every GitHub
push. `dist` is a single-commit orphan branch that each publish REPLACES, so
superseded builds never accumulate. /bin stays gitignored repo-wide and is
force-added only on that branch.

Verified live: manifest and both payloads serve anonymously over HTTPS, and a
downloaded client payload matches its declared SHA-256 and size byte for byte.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-18 19:49:06 +02:00
parent 8be14d3992
commit 600c331ac6
5 changed files with 410 additions and 6 deletions

View file

@ -19,14 +19,21 @@ public interface IReleaseManifestClient
/// </summary>
public sealed class ReleaseManifestClient : IReleaseManifestClient, IDisposable
{
public const string GitHubOwner = "eriknihlen";
public const string GitHubRepository = "acdream";
public const int MaximumManifestBytes = 1024 * 1024;
public const long MaximumArtifactBytes = 4L * 1024 * 1024 * 1024;
public const int MaximumRedirects = 5;
/// <summary>
/// Alpha distribution feed: the public Gitea repository's <c>dist</c>
/// branch, served as raw files (anonymous raw reads verified 2026-08-18,
/// so a friend needs no account). GitHub stays private, and its 100 MB
/// per-file limit could not carry the launcher payload anyway, so the
/// payloads live on <c>dist</c> — pushed to Gitea only — instead of on
/// <c>main</c>. <c>tools/publish-bin.ps1</c> builds them and
/// <c>tools/publish-dist.ps1</c> publishes that branch.
/// </summary>
public static Uri ProductionManifestUri { get; } = new(
$"https://github.com/{GitHubOwner}/{GitHubRepository}/releases/latest/download/manifest.json");
"https://git.snakedesert.se/erik/acdream/raw/branch/dist/bin/manifest.json");
private static readonly JsonSerializerOptions SerializerOptions = new()
{