diff --git a/github-electron/github-electron-main-tests.ts b/github-electron/github-electron-main-tests.ts index 5d3060e4bb..b2343da39e 100644 --- a/github-electron/github-electron-main-tests.ts +++ b/github-electron/github-electron-main-tests.ts @@ -227,6 +227,10 @@ app.commandLine.appendSwitch('vmodule', 'console=0'); autoUpdater.setFeedURL('http://mycompany.com/myapp/latest?version=' + app.getVersion()); +autoUpdater.checkForUpdates(); + +autoUpdater.quitAndInstall(); + // browser-window // https://github.com/atom/electron/blob/master/docs/api/browser-window.md diff --git a/github-electron/github-electron.d.ts b/github-electron/github-electron.d.ts index 418ef71fcc..c589a9d980 100644 --- a/github-electron/github-electron.d.ts +++ b/github-electron/github-electron.d.ts @@ -1186,6 +1186,11 @@ declare module Electron { * before using this API */ checkForUpdates(): any; + /** + * Restarts the app and installs the update after it has been downloaded. + * It should only be called after update-downloaded has been emitted. + */ + quitAndInstall(): any; } module Dialog {