Skip to content

Commit

Permalink
Notarize in afterSign step instead of afterPack
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Feb 24, 2022
1 parent edcd005 commit c11e935
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
},
"beforeBuild": "scripts/install-cross-deps.js",
"afterPack": "ts/scripts/after-pack.js",
"afterSign": "ts/scripts/after-sign.js",
"asarUnpack": [
"ts/workers/heicConverter.bundle.js",
"ts/sql/mainWorker.bundle.js",
Expand Down
4 changes: 0 additions & 4 deletions ts/scripts/after-pack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,10 @@ import { afterPack as fuseElectron } from './fuse-electron';
import { afterPack as mergeASARs } from './merge-macos-asars';
import { afterPack as copyPacks } from './copy-language-packs';
import { afterPack as pruneMacOSRelease } from './prune-macos-release';
import { afterPack as notarize } from './notarize';

export async function afterPack(context: AfterPackContext): Promise<void> {
await pruneMacOSRelease(context);
await mergeASARs(context);
await fuseElectron(context);
await copyPacks(context);

// This must be the last step
await notarize(context);
}
12 changes: 12 additions & 0 deletions ts/scripts/after-sign.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only

import type { AfterPackContext } from 'electron-builder';
import { afterSign as notarize } from './notarize';

// NOTE: It is AfterPackContext here even though it is afterSign.
// See: https://www.electron.build/configuration/configuration.html#aftersign
export async function afterSign(context: AfterPackContext): Promise<void> {
// This must be the last step
await notarize(context);
}
2 changes: 1 addition & 1 deletion ts/scripts/notarize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as packageJson from '../../package.json';

/* eslint-disable no-console */

export async function afterPack({
export async function afterSign({
appOutDir,
packager,
electronPlatformName,
Expand Down

0 comments on commit c11e935

Please sign in to comment.