Skip to content

Commit 5249752

Browse files
authored
fix: use the electron version, not the app's version COMPASS-7305 (#4962)
use the electron version, not the app's version
1 parent b843e97 commit 5249752

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

packages/hadron-build/commands/release.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,13 @@ const fixCompass5333 = (CONFIG, done) => {
190190
* @api public
191191
*/
192192
const writeVersionFile = (CONFIG, done) => {
193-
return CONFIG.write('version', CONFIG.version)
193+
// This version will be used by electron-installer-common to determine which
194+
// dependencies of electron to include.
195+
const version = CONFIG.packagerOptions.electronVersion;
196+
197+
return CONFIG.write('version', version)
194198
.then(dest => {
195-
cli.debug(format('version written to `%s`', dest));
199+
cli.debug(format('version `%s` written to `%s`', version, dest));
196200
if (done) {
197201
done(null, true);
198202
}

packages/hadron-build/lib/target.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ class Target {
288288
}
289289
debug(`Writing ${contents.length} bytes to ${dest}`);
290290
await fs.promises.writeFile(dest, contents);
291+
292+
return dest; // this is used by the caller
291293
}
292294

293295
/**

0 commit comments

Comments
 (0)