-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(mac): Remove redundant signing op for mas and mas-dev targets (#4321
- Loading branch information
Showing
1 changed file
with
15 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,10 +88,14 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> { | |
} | ||
} | ||
|
||
private hasMasTarget(targets: Array<Target>) { | ||
return targets.length !== 0 && targets.some(it => it.name === "mas" || it.name === "mas-dev") | ||
} | ||
|
||
async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<any> { | ||
let nonMasPromise: Promise<any> | null = null | ||
|
||
const hasMas = targets.length !== 0 && targets.some(it => it.name === "mas" || it.name === "mas-dev") | ||
const hasMas = this.hasMasTarget(targets) | ||
const prepackaged = this.packagerOptions.prepackaged | ||
|
||
if (!hasMas || targets.length > 1) { | ||
|
@@ -323,12 +327,16 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> { | |
protected async signApp(packContext: AfterPackContext, isAsar: boolean): Promise<any> { | ||
const appFileName = `${this.appInfo.productFilename}.app` | ||
|
||
await BluebirdPromise.map(readdir(packContext.appOutDir), (file: string): any => { | ||
if (file === appFileName) { | ||
return this.sign(path.join(packContext.appOutDir, file), null, null) | ||
} | ||
return null | ||
}) | ||
const hasMas = this.hasMasTarget(packContext.targets) | ||
// No need to sign on mas targets since we sign the folder on pack() | ||
if (!hasMas) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
oNaiPs
Author
Contributor
|
||
await BluebirdPromise.map(readdir(packContext.appOutDir), (file: string): any => { | ||
if (file === appFileName) { | ||
return this.sign(path.join(packContext.appOutDir, file), null, null) | ||
} | ||
return null | ||
}) | ||
} | ||
|
||
if (!isAsar) { | ||
return | ||
|
This comment has been minimized.
Sorry, something went wrong.
patrickmichalinaDec 9, 2019