Skip to content

Commit d42ee59

Browse files
committed
1 parent 88e7ab2 commit d42ee59

File tree

3 files changed

+56
-1
lines changed

3 files changed

+56
-1
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
diff --git a/lib/check-signature.js b/lib/check-signature.js
2+
index 324568af71bcc4372c9f959131ecd24122848c86..677348e0a138ff608b2ac41f592d813b15ee4956 100644
3+
--- a/lib/check-signature.js
4+
+++ b/lib/check-signature.js
5+
@@ -41,16 +41,12 @@ const spawn_1 = require("./spawn");
6+
const debug_1 = __importDefault(require("debug"));
7+
const d = (0, debug_1.default)('electron-notarize');
8+
const codesignDisplay = (opts) => __awaiter(void 0, void 0, void 0, function* () {
9+
- const result = yield (0, spawn_1.spawn)('codesign', ['-dv', '-vvvv', '--deep', path.basename(opts.appPath)], {
10+
- cwd: path.dirname(opts.appPath),
11+
- });
12+
+ const result = yield (0, spawn_1.spawn)('codesign', ['-dv', '-vvvv', '--deep', opts.appPath]);
13+
return result;
14+
});
15+
const codesign = (opts) => __awaiter(void 0, void 0, void 0, function* () {
16+
d('attempting to check codesign of app:', opts.appPath);
17+
- const result = yield (0, spawn_1.spawn)('codesign', ['-vvv', '--deep', '--strict', path.basename(opts.appPath)], {
18+
- cwd: path.dirname(opts.appPath),
19+
- });
20+
+ const result = yield (0, spawn_1.spawn)('codesign', ['-vvv', '--deep', '--strict', opts.appPath]);
21+
return result;
22+
});
23+
function checkSignatures(opts) {
24+
diff --git a/lib/notarytool.js b/lib/notarytool.js
25+
index 1ab090efb2101fc8bee5553445e0349c54474421..a5ddfd922197449fc56078e4a7e9a2ee5d8d207d 100644
26+
--- a/lib/notarytool.js
27+
+++ b/lib/notarytool.js
28+
@@ -92,9 +92,7 @@ function notarizeAndWaitForNotaryTool(opts) {
29+
else {
30+
filePath = path.resolve(dir, `${path.parse(opts.appPath).name}.zip`);
31+
d('zipping application to:', filePath);
32+
- const zipResult = yield (0, spawn_1.spawn)('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), filePath], {
33+
- cwd: path.dirname(opts.appPath),
34+
- });
35+
+ const zipResult = yield (0, spawn_1.spawn)('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', opts.appPath, filePath]);
36+
if (zipResult.code !== 0) {
37+
throw new Error(`Failed to zip application, exited with code: ${zipResult.code}\n\n${zipResult.output}`);
38+
}
39+
diff --git a/lib/staple.js b/lib/staple.js
40+
index 47dbd85b2fc279d999b57f47fb8171e1cc674436..f8829e6ac54fcd630a730d12d75acc1591b953b6 100644
41+
--- a/lib/staple.js
42+
+++ b/lib/staple.js
43+
@@ -43,9 +43,7 @@ const d = (0, debug_1.default)('electron-notarize:staple');
44+
function stapleApp(opts) {
45+
return __awaiter(this, void 0, void 0, function* () {
46+
d('attempting to staple app:', opts.appPath);
47+
- const result = yield (0, spawn_1.spawn)('xcrun', ['stapler', 'staple', '-v', path.basename(opts.appPath)], {
48+
- cwd: path.dirname(opts.appPath),
49+
- });
50+
+ const result = yield (0, spawn_1.spawn)('xcrun', ['stapler', 'staple', '-v', opts.appPath]);
51+
if (result.code !== 0) {
52+
throw new Error(`Failed to staple your application with code: ${result.code}\n\n${result.output}`);
53+
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696
"react-dom": "^17.0.0 || ^18.0.0"
9797
},
9898
"resolutions": {
99-
"@electron/notarize": "2.3.2"
99+
"@electron/notarize": "2.3.2",
100+
"@electron/notarize@npm:2.2.1": "patch:@electron/notarize@npm%3A2.3.2#~/.yarn/patches/@electron-notarize-npm-2.3.2-535908a4bd.patch"
100101
},
101102
"packageManager": "[email protected]"
102103
}

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ __metadata:
1111
dependencies:
1212
"@electron-toolkit/preload": "npm:^3.0.0"
1313
"@electron-toolkit/utils": "npm:^3.0.0"
14+
"@electron/notarize": "patch:@electron/notarize@npm%3A2.3.2#~/.yarn/patches/@electron-notarize-npm-2.3.2-535908a4bd.patch"
1415
"@types/adm-zip": "npm:^0"
1516
adm-zip: "npm:^0.5.15"
1617
dotenv-cli: "npm:^7.4.2"

0 commit comments

Comments
 (0)