Skip to content

Commit

Permalink
Fixed windows auto-update issue of 32bit and 64bit (#1839)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohamedin committed Feb 24, 2021
1 parent c3ffb30 commit 575c50e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/electron-builder-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ jobs:
cd drawio/src/main/webapp
yarn install
cd ../..
#Disable auto-update and build 32bit first such that latest.yml is for 64bit next
yarn run sync disableUpdate
yarn run release-win32
#Enable auto-update again
yarn run sync
yarn run release-win
yarn run release-win32
#Disable auto-update for appx also
yarn run sync disableUpdate
yarn run release-appx
7 changes: 2 additions & 5 deletions sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ let pj = require(appjsonpath)
pj.version = ver

fs.writeFileSync(appjsonpath, JSON.stringify(pj, null, 2), 'utf8')

if (process.argv[2] == 'disableUpdate')
{
fs.writeFileSync(disableUpdatePath, 'module.exports = { disableUpdate: function() { return true;}}', 'utf8');
}
//Enable/disable updates
fs.writeFileSync(disableUpdatePath, 'module.exports = { disableUpdate: function() { return ' + (process.argv[2] == 'disableUpdate'? 'true' : 'false') + ';}}', 'utf8');

child_process.spawnSync('yarn', ['install', '--production'], {cwd: electronAppDir})

0 comments on commit 575c50e

Please sign in to comment.