Skip to content
Permalink
Browse files

chore(tools): update dependency version for electron-forge modules to…

… be latest on bump
  • Loading branch information
MarshallOfSound committed Apr 16, 2018
1 parent c5b6c6a commit 1029d32b4fe09425833e31742058cffe052ed21b
Showing with 8 additions and 0 deletions.
  1. +8 −0 tools/bump.js
@@ -6,6 +6,7 @@ const semver = require('semver');

const BASE_DIR = path.resolve(__dirname, '..');
const PACKAGES_DIR = path.resolve(BASE_DIR, 'packages');
const ELECTRON_FORGE_PREFIX = '@electron-forge/';

(async () => {
// Check clean working dir
@@ -38,6 +39,13 @@ const PACKAGES_DIR = path.resolve(BASE_DIR, 'packages');
const pjPath = path.resolve(dir, 'package.json');
const existingPJ = await fs.readJson(pjPath);
existingPJ.version = version;
for (const type of ['dependencies', 'devDependencies', 'optionalDependencies']) {
for (const depKey in existingPJ[type]) {
if (depKey.startsWith(ELECTRON_FORGE_PREFIX)) {
existingPJ[type][depKey] = version;
}
}
}
await fs.writeJson(pjPath, existingPJ, {
spaces: 2,
});

0 comments on commit 1029d32

Please sign in to comment.
You can’t perform that action at this time.