Dependency updates, fixes required for successful release (#1966)
* A number of fixes required for successful build after upgrades - extract now takes an absolute directory only - something changed, so we now need to force NODE_ENV=production; we use electron-is-dev for this - electron-builder, electron-publisher-s3, and electron-updater are now updated to their latest available versions * Add direct dependency on extract-zip, since we use it directly * Load 'config' module after we've modified NODE_ENV * Downgrade electron-builder due to bug, downgrade icon-maker too The latest electron-builder came with a fix for one of our bugs as well as a new bug that blocks builds on Windows: https://github.com/electron-userland/electron-builder/issues/2462 There's no good reason to upgrade icon-maker. And a good reason to keep at the version on github: https://github.com/jaretburkett/electron-icon-maker/issues/7
This commit is contained in:
parent
d81943cf20
commit
177dfb3220
4 changed files with 244 additions and 294 deletions
|
@ -1,12 +1,9 @@
|
|||
const path = require('path');
|
||||
|
||||
const config = require('config');
|
||||
const electronIsDev = require('electron-is-dev');
|
||||
|
||||
const packageJson = require('../package.json');
|
||||
|
||||
|
||||
const environment = packageJson.environment || process.env.NODE_ENV || 'development';
|
||||
config.environment = environment;
|
||||
const defaultEnvironment = electronIsDev ? 'development' : 'production';
|
||||
const environment = process.env.NODE_ENV || defaultEnvironment;
|
||||
|
||||
// Set environment vars to configure node-config before requiring it
|
||||
process.env.NODE_ENV = environment;
|
||||
|
@ -22,6 +19,10 @@ if (environment === 'production') {
|
|||
process.env.SUPPRESS_NO_CONFIG_WARNING = '';
|
||||
}
|
||||
|
||||
// We load config after we've made our modifications to NODE_ENV
|
||||
const config = require('config');
|
||||
|
||||
config.environment = environment;
|
||||
|
||||
// Log resulting env vars in use by config
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue