Electron Release Server provides a backend for the Squirrel.Mac auto-updater. Squirrel.Mac is integrated by default in Electron applications.
The endpoints for Squirrel.Mac are:
- https://download.myapp.com/update/:platform/:version[/:channel]
- https://download.myapp.com/update/flavor/:flavor/:platform/:version[/:channel]
.
Note that version
is the currently installed version.
The server will accept the platform as osx
, darwin
,darwin_64
,macos
, and mac
.
Since the server supports multiple release channels, you can specify the channel when requesting updates. Examples of supported channels are stable
, beta
, alpha
. Each channel includes those above it; beta
will include stable
updates.
This url requires different parameters to return a correct version: version
and platform
.
If the flavor is not specified, then default
will be used.
For example with Electron's autoUpdater
module:
var app = require('app');
var os = require('os');
var autoUpdater = require('electron').autoUpdater;
var platform = os.platform() + '_' + os.arch(); // usually returns darwin_64
var version = app.getVersion();
var channel = 'stable';
autoUpdater.setFeedURL('http://download.myapp.com/update/' + platform + '/' + version + '/' + channel);