-
Notifications
You must be signed in to change notification settings - Fork 554
update osx
Arek Sredzki edited this page Dec 10, 2016
·
2 revisions
Electron Release Server provides a backend for the Squirrel.Mac auto-updater. Squirrel.Mac is integrated by default in Electron applications.
The endpoint for Squirrel.Mac is https://download.myapp.com/update/: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
.
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();
autoUpdater.setFeedURL('http://download.myapp.com/update/'+platform+'/'+version);