0.8.0 • Published 8 years ago

electron-gh-releases-updater v0.8.0

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

electron-gh-releases-updater

Warning: This project is currently not actively maintained and there are some bugs. Depending on the required features, you may look somewhere else.

electron-gh-releases-updeter lets you update your Electron based application through GitHub releases. It can both download entirely new releases and only new app code without the Electron runtime.

Requirements

You must use GitHub Releases to distribute your releases. Pre-releases are not supported at this time. The files must be compressed as .zip. They must end in ${os.platform()}-${os.arch()} for a complete update or update-any for updates containing only non-platform specific app code or update-${os.platform()}-${os.arch()} for app code including platform specific code.

The complete releases should include the application at the top level, the partial updates should include either the contents of the app folder or an app.asar.

Partial updates will fail and leave a broken installation when the application is placed on a drive other than the drive the OS places temporary folders on, it is not recommended they are used at this time.

On Linux unzip must be available (globally).

On Windows 7 PowerShell must be installed, on newer verions of Windows it is installed by default.

Usage

Pass in your package.json to the search function. A simple usage example:

import search from 'electron-gh-releases-updater';

const { updateAvailable, changelog, update } = search(require('../package.json'));

if (updateAvailable) {
    // Show changelog
    // changelog has type { tag: string, name: string, body: string }[]
    // and is a list of metadata from GitHub releases for all releases newer than the current one

    update();
}

The update function can be passed an optional callback that will be called with information about the progress of the download. It has the type

(progressCallback: (
    progress: {
        percentage: number,
        speed: number,
        size: {total: number, transferred: number},
        time: {elapsed: number, remaining: number}
    }) => void
) => void
0.8.0

8 years ago

0.7.3

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.0

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.1

9 years ago

0.1.0

9 years ago