Open In progress feature request

Download card: pick the file by visitor OS, and offer .deb / .rpm / AppImage on Linux

John Lauer · ·marked in progress by kcknox

Request (from John Lauer). Adom Hydrogen is getting a Linux build, shipped from the same page and the same release as the Windows one (adom/hydrogen). A Linux app ships as three packages, not one, so the page's download card needs to know the visitor's OS and offer a choice on Linux.

Today. A release holds several assets, each tagged with --platform any|linux|macos|windows and --arch. 1.0.705 has one asset, Adom.Hydrogen_1.0.705_x64-setup.exe (windows/x64). The download card promotes one file. A Linux release adds three assets that are all linux/x64, and nothing tells them apart:

  • adom-hydrogen_1.0.710_amd64.deb (Ubuntu, Debian, Mint, Pop!_OS)
  • adom-hydrogen-1.0.710.x86_64.rpm (Fedora, RHEL, openSUSE)
  • Adom_Hydrogen-1.0.710-x86_64.AppImage (any other Linux)

What we need.

  1. The card picks by visitor OS. Windows visitor: the .exe is the main button. Linux visitor: the Linux assets. macOS: what exists for macOS, or "not available yet". Another OS's file is never the main button.
  2. Linux: three labelled buttons. "Ubuntu / Debian (.deb)", "Fedora / RHEL (.rpm)", "Other Linux (AppImage)". If the browser hints at the distro (some user agents say Ubuntu or Fedora), that one can be first, but all three stay visible.
  3. A package kind on assets. Either inferred from the extension (.deb, .rpm, .AppImage, .exe, .msi, .dmg), or a new optional --kind on release upload, returned in release assets and the release JSON, so the card and any updater can tell them apart.
  4. "All downloads". A small link under the buttons listing every asset of the version with its platform, arch, size and sha256.
  5. Optional: a stable "latest" URL per kind. For example /download/adom/hydrogen/latest/deb redirects to the newest .deb. It lets a one-line Linux installer script on the page always fetch the newest build.

Why it matters beyond Hydrogen. Adom Bridge already has a Linux AppImage that has no place on its page, and any app shipping Linux packages will hit the same wall.

Happy to test it against a Hydrogen insiders release as soon as one has Linux assets.

1 Reply

Colby Knox marked this in progress ·
Colby Knox ·

Live on prod. All five points:

  1. Picks by visitor OS, one build included. Another OS's file is never the main button: a Mac visitor to a Windows-only release reads "No macOS build yet. Builds for other systems:".
  2. Linux gets three buttons. "Ubuntu / Debian .deb", "Fedora / RHEL .rpm", "Other Linux AppImage", all promoted for a Linux visitor. When the browser names the distro (Ubuntu's and Fedora's own Firefox do; Chrome does not), that one goes first and gets the "this machine" badge.
  3. Package kind is read from the extension, no flag needed: deb, rpm, appimage, exe, msi, msix, dmg, pkg, zip, tar.gz and a few more. It is returned as kind on every asset in the release list, release assets, releases/latest and the latest link's ?format=json. I skipped a --kind override on release upload; say if a file ever needs one.
  4. "All downloads" under the buttons lists every file of the version with platform, arch, kind, size and sha256 in plain view.
  5. Stable per-kind links: /download/adom/hydrogen/latest/deb (also /rpm, /appimage, or ?kind=deb) redirects to the newest released file of that kind. An unknown kind is a 404 coded UNKNOWN_ASSET_KIND. A Linux link with no kind gets the AppImage, since it runs on any distro.

Uploads need nothing new: --platform linux --arch x64 on each of the three files, as today. I'll leave this open until you have tried it on an insiders release with Linux assets.

Log in to reply.