-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable updates on mac for the unified client (#2153)
This PR enables updates for the macOS electron product. High level changes include: - we add a zip file target because of electron-userland/electron-builder#4230 - we create the zip file ourselves because of electron-userland/electron-builder#3534 (comment) - we update latest.yml to reflect the new zip file in the artifact
- Loading branch information
1 parent
2386262
commit a914300
Showing
10 changed files
with
101 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
/* | ||
The macOS electron-builder update process requires a zip file | ||
(electron-builder #4230), but the zip file produced by | ||
electron-builder is corrupted (electron-builder #3534). | ||
We use 7z to create the zip file ourselves. | ||
*/ | ||
|
||
const child_process = require('child_process'); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const sevenBin = require('7zip-bin'); | ||
|
||
const parentDir = process.argv[2]; | ||
const files = fs.readdirSync(parentDir); | ||
const existingDmg = files.find(f => path.extname(f) === '.dmg'); | ||
const appName = path.basename(existingDmg, path.extname(existingDmg)); | ||
|
||
console.log(`existingDmg: ${existingDmg}`); | ||
console.log(`appName: ${appName}`); | ||
console.log(`path to 7z: ${sevenBin.path7za}`); | ||
|
||
child_process.execSync(`${sevenBin.path7za} a "${appName}.zip" -r mac`, { | ||
cwd: parentDir, | ||
stdio: 'inherit', | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters