Menu

One installer filename lives in three files, and the version number lives in a header nothing reads
📰

One installer filename lives in three files, and the version number lives in a header nothing reads

DEV Community: node·Daniel Pertu·16 days ago
#jTxOFuFR
#devtonodejs#devto#dev#notifio#version
Reading 0:00
15s threshold

Notifio ships three installers: one NSIS setup for Windows and two DMGs for Mac, because a universal build would bundle two copies of Chromium. They are built locally, uploaded to Cloudflare R2 under fixed object keys, and served through an API route that presigns a URL and redirects to it.

That means one filename, notifio-arm64.dmg , has to be written identically in three files that know nothing about each other.

The triangle

First, electron-builder decides what the file on disk is called:

"mac" : { "target" : [{ "target" : "dmg" , "arch" : [ "arm64" , "x64" ] }], "artifactName" : "notifio-${arch}.dmg" } , "win" : { "target" : [ "nsis" ], "artifactName" : "notifio-setup.exe" }

Enter fullscreen mode

Exit fullscreen mode

Second, the release script decides what to upload and under what key, and its comment is doing all of the work that a type would otherwise do:

// Artifact name -> content type.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.