Skip to content

fix(updater): Windows installs update from the Windows bundle, not the source tarball (#373) - #374

Merged
rowkav09 merged 1 commit into
mainfrom
fix/updater-platform-asset
Sep 24, 2026
Merged

rowkav09 merged 1 commit into
mainfrom
fix/updater-platform-asset

Conversation

@rowkav09

Copy link
Copy Markdown
Member

Part of #373 (1 of 2: check + download).

What

  • updateAssetName(version, platform): on win32 it's nowplaying-vX.Y.Z-windows-x64.zip (what release.yml publishes since ci(release): build and attach Windows installer and zip to stable releases (#353) #356). Anywhere else it stays nowplaying-vX.Y.Z.tar.gz.
  • checkForUpdate takes platform (defaults to process.platform), picks that asset and returns assetName. A Windows install refuses a release that only has the tarball instead of falling back to it.
  • downloadVerifiedUpdate checks the digest against the SHA256SUMS line for that exact asset. It only accepts the two names published for that version, so a bad assetName can't point it at something else. Without assetName it defaults to the tarball, as before.
  • createAutoUpdater passes platform through.

Existing tests pin platform: "linux" so they mean the same thing on the Windows CI runner.

Tests

  • New: Windows picks the zip, Linux picks the tar, a Windows install rejects a tarball-only release, name mapping, zip checksum line, unexpected names refused.
  • Updater suites: 35 pass. Full npm test: only the existing local sharp-runtime failure (passes in CI).

Next PR: install unpacks and validates the Windows bundle, plus an end-to-end check -> download -> swap test.

@github-actions

Copy link
Copy Markdown
Contributor

/mira pause

@github-actions github-actions Bot added mira-paused Pause automatic Mira reviews on this pull request area:updater size:M and removed mira-paused Pause automatic Mira reviews on this pull request labels Sep 24, 2026
@codecov

codecov Bot commented Sep 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:updater mira-paused Pause automatic Mira reviews on this pull request size:M

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant