Skip to content

feat(update): let Nightcap update itself - #160

Merged
CoderDayton merged 4 commits into
mainfrom
feat/self-update
Dec 2, 2026
Merged

CoderDayton merged 4 commits into
mainfrom
feat/self-update

Conversation

@CoderDayton

Copy link
Copy Markdown
Owner

Nightcap now checks GitHub for its own releases and updates itself.

  • The AppImage downloads the new release, checks it against a signed SHA256SUMS, swaps itself in and restarts. deb/rpm installs go through pkexec. Flatpak, Arch, Nix and source installs show the right command to copy instead (on Arch it picks the AUR helper you have, or the makepkg steps).
  • When Roblox stops letting the installed build join and the newest one failed with this Nightcap, the launch asks to update Nightcap instead of failing to join.
  • Settings gets an About page with the version, Check/Update, links and a version pill next to the name. The window is now always dark with one violet accent.
  • The release workflow signs nightcap v<version> + SHA256SUMS with NIGHTCAP_RELEASE_SIGNING_KEY (already in the release environment) and fails without it. Releases are created as drafts and published after every file is up.

Tested from a clean clone: full ctest passes, the release script ran against a fake gh (good, wrong and missing key), a workflow-made signature verifies in the C++ verifier and fails under another tag, and a 0.5.5 build hit the real launch gate against live Roblox and GitHub as an AppImage and a Flatpak. A real install can't be tested until a signed release exists, so the first release with this is the end-to-end test.

Ported from the Mac version's updater. `mocktail_updater nightcap` checks
GitHub (cached 6 hours), verifies the signed SHA256SUMS and installs the
AppImage, deb or Fedora rpm. Flatpak, Arch and Nix get their own update
command instead.

- When Roblox refuses the installed build and the newest one failed its
  test launch with this Nightcap, launch asks to update first.
- Settings gets updates.nightcap (auto/notify/off) and a version row
  with Check/Update.
- The release workflow signs SHA256SUMS and publishes the release only
  after every file is uploaded.
…update

- Settings gets an About page with the version, the Roblox build,
  Check/Update, links and the log, plus a version pill next to the name
  that turns into Update when a release is out. The window is always
  dark, in neutral greys with one muted violet accent.
- Installs that update by command (Flatpak, Arch, the release deb/rpm
  without pkexec) show it with a copy button, in Settings and in the
  launch dialog. Arch names the AUR helper that is installed.
- The release signature covers the tag, so old signed files can't be
  republished as a newer release.
- The restarted AppImage gets the launch's own environment, partial
  copies are cleaned up, and the launch gate re-checks GitHub before
  saying no fix is out.
@CoderDayton
CoderDayton merged commit 35f1028 into main Dec 2, 2026
8 of 9 checks passed
@CoderDayton
CoderDayton deleted the feat/self-update branch December 2, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant