Skip to content

Commit

Permalink
fix: use the electron version, not the app's version COMPASS-7305 (#4962
Browse files Browse the repository at this point in the history
)

use the electron version, not the app's version
  • Loading branch information
lerouxb authored Oct 6, 2023
1 parent b843e97 commit 5249752
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/hadron-build/commands/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,13 @@ const fixCompass5333 = (CONFIG, done) => {
* @api public
*/
const writeVersionFile = (CONFIG, done) => {
return CONFIG.write('version', CONFIG.version)
// This version will be used by electron-installer-common to determine which
// dependencies of electron to include.
const version = CONFIG.packagerOptions.electronVersion;

return CONFIG.write('version', version)
.then(dest => {
cli.debug(format('version written to `%s`', dest));
cli.debug(format('version `%s` written to `%s`', version, dest));
if (done) {
done(null, true);
}
Expand Down
2 changes: 2 additions & 0 deletions packages/hadron-build/lib/target.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ class Target {
}
debug(`Writing ${contents.length} bytes to ${dest}`);
await fs.promises.writeFile(dest, contents);

return dest; // this is used by the caller
}

/**
Expand Down

0 comments on commit 5249752

Please sign in to comment.