M9: Release tooling (packages, Flatpak, signed updater, app ID) #25

Merged
mett merged 2 commits from feat/m9-release into main 2026-10-29 15:31:12 +01:00
Owner

Release tooling for 0.1.0, as decided: built locally, published as Forgejo releases, signed auto-updater, app ID dev.m3tt.Cushion.

Part of #9. The release itself still needs steps only you can do (below); close #9 once 0.1.0 is out.

What's in it

  • App ID dev.m3tt.Cushion: the old dev.cushion.app folders (config, data, cache) are moved at start, before Tauri opens them, and the keyring login moves on first read. Download paths are stored relative, so they stay valid.
  • Updater (tauri-plugin-updater 2.14): checks a signed feed at start (can be turned off) and offers "Install and restart"; Settings → Updates has the version and "Check now". It works for .deb and .rpm (installed through pkexec, so it asks for a password) and NSIS. The Flatpak shows a pointer to the releases page instead.
  • Packages: .deb (libmpv2), .rpm (mpv-libs), Flatpak bundle (GNOME 51, which still ships webkit2gtk-4.1; libmpv built in the manifest with libass and libplacebo, audio only; the Ayatana tray from flathub/shared-modules) and NSIS with libmpv-2.dll.
  • scripts/release.sh (Linux, with --dry-run) and scripts/release-windows.ps1, plus docs/release.md and release-notes/v0.1.0.md.
  • Feed location: https://git.m3tt.dev/mett/cushion/releases/download/latest/latest.json. Each release carries its own latest.json; Forgejo 16 (git.m3tt.dev runs 16.0.7) resolves latest to the newest non-pre-release.
  • Release key is set: plugins.updater.pubkey holds your key (minisign 8D2A645FAA3F5AD1).
  • Fix: the player set mpv's ytdl option unconditionally; a libmpv built without Lua (the Flatpak's) refused to start with that.
  • Fix: the player bar was cut off in short windows. The top grid row (1fr) grew with the sidebar; now it is minmax(0, 1fr) and the sidebar scrolls. Checked at 900×600.
  • The Flatpak builds in ~/.cache/cushion-flatpak, not in the repo: its build folder holds bind mounts of /proc, which ran Vite's file watcher out of inotify watches (blank dev window). Vite ignores packaging/ and dist/ too.

Before the first release

Done by you already: key generated, repository public, libayatana-appindicator-gtk3-devel installed. After merging: scripts/release.sh on main, then scripts/release-windows.ps1 on Windows (docs/release.md).

Tests

  • pnpm check, Prettier, cargo fmt, cargo clippy -D warnings, cargo test with the live tests against the test server: all pass. New unit tests for the folder migration and for which bundles can update.
  • scripts/release.sh --dry-run with a throwaway key (never committed): builds the .deb, .rpm, Flatpak bundle, signatures, latest.json and SHA256SUMS. The .rpm needs mpv-libs, libwebkit2gtk-4.1, libgtk-3 and libayatana-appindicator3; the .deb control file has the Debian names.
  • Flatpak, installed with --user and run (then uninstalled): login, keyring through the sandbox, tray, playback through the built libmpv (muted), and the Flatpak note in the settings.
  • Updater, using the binary from the .rpm and a local feed:
    • The notice appears and Settings shows the check.
    • Download and signature check pass for a properly signed 0.1.1.
    • A feed that lies about the version is rejected ("signed for version 0.1.0 but the endpoint announced 0.1.1").
    • Not run: the install step itself (pkexec rpm -U, needs your password).
  • Migration happened live: old test-run folders were moved, and the login came along from the old keyring entry.
  • Not tested:
    • Publishing (fj release create), so also the latest link on git.m3tt.dev itself (read from the Forgejo 16 source; no release there yet).
    • The Windows script (no Windows here; also not parse-checked, no pwsh).
    • Installing the .deb/.rpm system-wide.

🤖 Generated with Claude Code

Release tooling for 0.1.0, as decided: built locally, published as Forgejo releases, signed auto-updater, app ID `dev.m3tt.Cushion`. Part of #9. The release itself still needs steps only you can do (below); close #9 once 0.1.0 is out. ## What's in it - **App ID `dev.m3tt.Cushion`**: the old `dev.cushion.app` folders (config, data, cache) are moved at start, before Tauri opens them, and the keyring login moves on first read. Download paths are stored relative, so they stay valid. - **Updater** (`tauri-plugin-updater` 2.14): checks a signed feed at start (can be turned off) and offers "Install and restart"; Settings → Updates has the version and "Check now". It works for .deb and .rpm (installed through `pkexec`, so it asks for a password) and NSIS. The Flatpak shows a pointer to the releases page instead. - **Packages**: .deb (`libmpv2`), .rpm (`mpv-libs`), Flatpak bundle (GNOME 51, which still ships webkit2gtk-4.1; libmpv built in the manifest with libass and libplacebo, audio only; the Ayatana tray from flathub/shared-modules) and NSIS with `libmpv-2.dll`. - **`scripts/release.sh`** (Linux, with `--dry-run`) and **`scripts/release-windows.ps1`**, plus `docs/release.md` and `release-notes/v0.1.0.md`. - **Feed location:** `https://git.m3tt.dev/mett/cushion/releases/download/latest/latest.json`. Each release carries its own `latest.json`; Forgejo 16 (git.m3tt.dev runs 16.0.7) resolves `latest` to the newest non-pre-release. - **Release key** is set: `plugins.updater.pubkey` holds your key (minisign `8D2A645FAA3F5AD1`). - **Fix:** the player set mpv's `ytdl` option unconditionally; a libmpv built without Lua (the Flatpak's) refused to start with that. - **Fix:** the player bar was cut off in short windows. The top grid row (`1fr`) grew with the sidebar; now it is `minmax(0, 1fr)` and the sidebar scrolls. Checked at 900×600. - The Flatpak builds in `~/.cache/cushion-flatpak`, not in the repo: its build folder holds bind mounts of `/proc`, which ran Vite's file watcher out of inotify watches (blank dev window). Vite ignores `packaging/` and `dist/` too. ## Before the first release Done by you already: key generated, repository public, `libayatana-appindicator-gtk3-devel` installed. After merging: `scripts/release.sh` on main, then `scripts/release-windows.ps1` on Windows (docs/release.md). ## Tests - `pnpm check`, Prettier, `cargo fmt`, `cargo clippy -D warnings`, `cargo test` with the live tests against the test server: all pass. New unit tests for the folder migration and for which bundles can update. - `scripts/release.sh --dry-run` with a throwaway key (never committed): builds the .deb, .rpm, Flatpak bundle, signatures, `latest.json` and `SHA256SUMS`. The .rpm needs `mpv-libs`, `libwebkit2gtk-4.1`, `libgtk-3` and `libayatana-appindicator3`; the .deb control file has the Debian names. - **Flatpak**, installed with `--user` and run (then uninstalled): login, keyring through the sandbox, tray, playback through the built libmpv (muted), and the Flatpak note in the settings. - **Updater**, using the binary from the .rpm and a local feed: - The notice appears and Settings shows the check. - Download and signature check pass for a properly signed 0.1.1. - A feed that lies about the version is rejected ("signed for version 0.1.0 but the endpoint announced 0.1.1"). - Not run: the install step itself (`pkexec rpm -U`, needs your password). - **Migration** happened live: old test-run folders were moved, and the login came along from the old keyring entry. - **Not tested:** - Publishing (`fj release create`), so also the `latest` link on git.m3tt.dev itself (read from the Forgejo 16 source; no release there yet). - The Windows script (no Windows here; also not parse-checked, no `pwsh`). - Installing the .deb/.rpm system-wide. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- The app is dev.m3tt.Cushion (was dev.cushion.app). migrate.rs moves the
  old config, data and cache folders before Tauri opens them; the keyring
  login moves on first read.
- tauri-plugin-updater (signed packages from a feed on Forgejo) and
  tauri-plugin-process (restart). update_support says whether this install
  can update itself: .deb, .rpm (installed with pkexec) and NSIS can; the
  Flatpak and builds from the source tree can't.
- Bundles: .deb (libmpv2) and .rpm (mpv-libs) on Linux, NSIS with
  libmpv-2.dll next to cushion.exe on Windows (per-platform configs);
  updater artifacts and signatures. Category Music (Audio isn't valid).
- player: only set `ytdl` where libmpv has it; the Flatpak's libmpv is
  built without Lua and refused to start otherwise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Update notice at start when a newer version is out ("Install and
  restart" / "Later") and an Updates section in the settings (version,
  check at start on/off, check now). The Flatpak points to the releases
  page instead.
- packaging/flatpak: manifest on GNOME 51 (still has webkit2gtk-4.1),
  built from the .deb plus libmpv (with libass and libplacebo, audio only)
  and the Ayatana tray from flathub/shared-modules; AppStream metainfo.
- scripts/release.sh: checks versions, key and tree, builds .deb, .rpm and
  the Flatpak bundle, writes latest.json and SHA256SUMS, tags, publishes
  the release with fj and replaces latest.json on the fixed "updater"
  pre-release (Forgejo 15 can't link to an asset of the latest release).
  --dry-run builds only.
- scripts/release-windows.ps1: libmpv from shinchiro, NSIS build, uploads
  the installer and adds the Windows entry to latest.json.
- docs/release.md (signing key, tools, steps), release-notes/v0.1.0.md,
  README install section, PLAN.md: channels are Forgejo releases for now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mett merged commit eaf9677a32 into main 2026-10-29 15:31:12 +01:00
Sign in to join this conversation.
No description provided.