feat(ruffle): add stable and nightly release channels

Ruffle publishes tagged releases and daily nightlies into a single
GitHub feed. The updater took whichever release came first carrying a
web-selfhosted.zip, so a stable release landing at the top of the feed
was installed on hosts tracking nightlies -- and because version
comparison normalised everything to a build date, the resulting semver
never matched, leaving the host reporting an update forever.

Selection now filters on GitHub's prerelease flag, and comparison
splits by channel: build date for nightlies, numeric parts for stable.
The channel lives in the ruffle.channel system setting (default
stable) and governs both manual installs and the scheduled job.
Switching channels records the choice and reports the target build;
nothing is downloaded until the install is requested.

Stable releases are months apart and can fall outside the recent page
the changelog is built from, so that channel falls back to the
latest-release endpoint.
This commit is contained in:
Darkraise
2026-08-22 01:06:03 +07:00
parent 837415a3dd
commit 4ffa92a3a5
10 changed files with 582 additions and 155 deletions
+24 -3
View File
@@ -154,21 +154,42 @@ Returns paginated logs with timestamp, status, duration, message, details.
## Ruffle Endpoints
Ruffle ships two release channels. `stable` tracks the tagged `vX.Y.Z` releases
and is the default; `nightly` tracks the daily `nightly-YYYY-MM-DD` builds. The
channel is stored as the `ruffle.channel` system setting and applies to both
manual installs and the scheduled `ruffle-update` job.
### Get Ruffle Version
`GET /api/ruffle/version` - No auth required
Returns `currentVersion`, `isInstalled`, `installedChannel` (the channel of the
installed build, or `null`) and `channel` (the configured channel).
### Check for Ruffle Updates
`GET /api/ruffle/check-update` - Requires `settings.update` permission
Checks the configured channel. Returns the fields above plus `latestVersion`,
`updateAvailable`, `channelSwitch` (true when the installed build is on the
other channel), `changelog` and `publishedAt`.
### Set the Ruffle Channel
`PUT /api/ruffle/channel` - Requires `settings.update` permission
Body: `{ "channel": "stable" | "nightly" }`
Persists the channel and returns a fresh check against it. Nothing is
downloaded — call the update endpoint to install.
### Update Ruffle
`POST /api/ruffle/update` - Requires `settings.update` permission
Returns `202 Accepted` (download/install in progress)
Error: `409 Conflict` if update already in progress
Downloads and installs the latest build on the configured channel, then returns
`{ success, version, channel, message }` once the install is verified. The
previous installation is restored if verification fails.
## Updates Endpoints
+6 -1
View File
@@ -102,7 +102,12 @@ to `window.location.origin`.
checkout, or an image built without the `VERSION` build arg — reports that
checks are off rather than claiming to be behind.
- **Game Metadata** - Sync game metadata from a configured source
- **Ruffle Emulator Management** - Check for and install Ruffle updates
- **Ruffle Emulator Management** - Check for and install Ruffle updates, and
pick the release channel. **Stable** (the default) tracks Ruffle's tagged
`vX.Y.Z` releases; **Nightly** tracks the daily builds, which carry the newest
fixes and the newest regressions. Changing the channel only records the
choice — the new build installs when you click install, and the scheduled
Ruffle update job then keeps that channel up to date.
#### Metadata Tab