Skip to content

AlexxNica/electron-npg-automator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

electron-npg-automator

Automate node-pre-gyp deployment of native modules for electron

This is a small tool meant to allow you to publish new builds of your native node addon for node-pre-gyp whenever a new version of either your module or of electron is published.

How it works

This module polls the github APIs hourly, looking for the latest published releases of your module and of electron.

Note: This requires you to publish releases on github, not just to push tags.

It then tags itself with tags specifying the 2 most recent versions of both electron and your module, so that any of the 4 resulting builds that don't already exist will be published. Appveyor and Travis will pick up these tags, and do builds, which then get published to AWS using node-pre-gyp.

Setup and Configuration

First, fork the repo. It needs to be published to Github for Appveyor and Travis to work. Configure appveyor and travis against your repo for tag events. Install is just npm install, and to run the server use npm start. Basic configuration is set up by either a config file config.js/config.json in the root of the folder, or by environment variables. Environment variable names are all prefixed with electron_npg_automator_ (e.g. electron_npg_automator_remote)

What json example default
Module module 'myorg/mymodule' N/A
Remote remote 'upstream' 'origin'
Github Access Token gh_token 'adf234234134141212' N/A
Poll Interval in milliseconds poll_interval 3600000 (1hr) 86400000

Additionally, you can add a script ci/custom_prepare.js. This script should return a promise, which resolves is preparation was successful. The default behavior if no custom script is in place is to run npm intall in your modules directory. Use a custom script if you have any custom installation steps you need done before compilation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%