Dev and check runs stamp 0.0.0-dev-$GITHUB_RUN_NUMBER with no tag lookup; versions are display text that the release service and the updater never compare, so builds numbered below 2.3.1 are fine. macOS dev builds take the run number as CFBundleVersion. The Linux and Windows installers and the Windows Setup.exe no longer refuse to install a lower version than the one installed. Docs describe following the channel's current release, required releases, rollbacks, and confirmed channel switches. Also drops an unused import that failed Check macOS.
5.4 KiB
Hex on the Anomaly release service
Contract between Hex's release workflow (publishing) and Hex's in-app updater
(client). The service and its rules are anomalyco/release
(docs/protocol.md, docs/publishing.md); this file pins Hex's names.
Names
https://anoma.ly/release/hex/ the service (its dev stage, dev.anoma.ly/release, only tests the service)
├─ index.json download page and installers
└─ desktop/<channel>.json the manifest the app polls; channels stable, beta, dev
└─ release.targets
├─ macos-arm64 Hex-<v>-macos-arm64.zip ditto zip, root Hex.app (updater)
├─ macos-arm64-dmg Hex-<v>-macos-arm64.dmg notarized DMG (download page)
├─ windows-x64 Hex-<v>-windows-x64.exe bare hex.exe (updater)
├─ windows-x64-setup Hex-Setup-<v>-windows-x64.exe Inno Setup installer (download page)
├─ windows-arm64 Hex-<v>-windows-arm64.exe
├─ windows-arm64-setup Hex-Setup-<v>-windows-arm64.exe
└─ linux-x64 hex-<v>-linux-x64 bare executable (updater, installer, AUR)
- App
hex, artifactdesktop.stableis the public channel; every push todevpublishes0.0.0-dev-<run number>on thedevchannel.betais registered for later use. - Every executable and archive is signed before upload (Developer ID + notarization on macOS, Authenticode on Windows); the service stores bytes and their size and SHA-256, and manifests are not signed. Linux relies on HTTPS and the manifest's SHA-256.
- Versions are
X.Y.Zon stable. The service refuses an equal or lower version unless the current one is revoked.
Distributions
Recorded in every release; package-manager entries gain version only after
that job succeeds (the distribution action):
| Kind | Fields | Command |
|---|---|---|
direct |
(updates itself) | |
aur |
package: hex-bin |
yay -Syu hex-bin |
brew |
cask: anomalyco/tap/hex |
brew upgrade --cask anomalyco/tap/hex |
nix |
attribute: github:anomalyco/hex |
nix profile upgrade hex |
Direct-install receipt
The installers write install.json
({"app":"hex","artifact":"desktop","channel":"stable","method":"direct","root":"<root>"})
at the root of the user-owned install, and the client self-updates only when
it is present and the root is writable by this user alone:
- Linux:
~/.local/share/voice-control/install.json(install-linux.sh;scripts/install-linux.shsource builds write none and keep theirsource-buildmarker). - Windows:
%APPDATA%\voice-control\install.json(install-windows.ps1and the Setup.exe). - macOS: the client decides from the bundle's location (a writable,
non-translocated
Hex.appis direct).
HEX_RELEASE_BASE_URL (HTTPS only) points a build at another service origin
for local tests against a fixture service; nothing defaults to another
origin.
Old clients (2.3.1 and earlier)
https://anoma.ly/hex/files/{linux-update.json,windows-update.json,appcast.xml}
stay frozen at 2.3.1 in the hex-production-files bucket. At the first
release on the service, the appcast gains one informational item pointing at
https://anoma.ly/hex (see docs/releasing.md).
Client
src/updater.rs (all three OSes) polls <origin>/hex/desktop/<channel>.json
10 seconds after launch, hourly (the Dev channel every 10 minutes and when the window gains focus, at most once a minute), and on Check now, with If-None-Match, and
decides with the protocol's client rules (updater/protocol.rs, which passes
the service's test-vectors/ copied to tests/fixtures/release-protocol).
Versions are never compared: Hex takes the channel's current release whenever
it is not the running build, identified on Linux and Windows by the
executable's SHA-256 (the target file itself) and on macOS by its exact
version. required releases skip the rollout. The checked channel is the
Update channel setting, else the channel the build was published on
(HEX_BUILD_CHANNEL, stamped by Release; older builds: dev for a dev
version, else the receipt's). A setting other than the build's channel is a
switch: Settings, the Windows tray, and the macOS menu offer "Switch to
Stable 2.3.1", and nothing downloads until the user confirms.
install method distribution channel acts on install
macOS writable Hex.app direct stable unzip beside it, codesign -R app/update-requirement.txt, swap at restart/quit
macOS read-only/translocated direct stable Download update → macos-arm64-dmg URL
Linux versions/ + receipt direct receipt's copy into versions/<v>, switch current
Linux pacman / Nix aur / nix stable show the distribution's command
Windows versions/ + receipt direct receipt's Authenticode (AUTHENTICODE_SIGNER), versions\<v>, current-version
source and test builds (never check)
anything else unknown stable Download update → notes_url
Target URLs are absolute-path references (/release/hex/files/<sha256>/<name>)
resolved against the manifest URL (RFC 3986), so they keep the manifest's
host (anoma.ly or dev.anoma.ly). Downloads resume into <support>/updates/<sha256>/ and are
checked against size and sha256 before any other use. The rollout bucket
is <support>/update-bucket.