Skip to content

Commit

Permalink
LLD Signing on macOS + Windows update (#3779)
Browse files Browse the repository at this point in the history
* chore(deps): update electron-notarize to @electron/notarize

chore(dep): add missing debug

* chore(notarize): try catch the specific staple error

* chore(windows): update azure key
  • Loading branch information
valpinkman authored and hedi-edelbloute committed Jun 22, 2023
1 parent 2eec5d9 commit 8cc2a86
Show file tree
Hide file tree
Showing 4 changed files with 503 additions and 452 deletions.
2 changes: 1 addition & 1 deletion apps/ledger-live-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
"@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.15.0",
"@mapbox/node-pre-gyp": "^1.0.8",
"@electron/notarize": "^1.2.4",
"@octokit/rest": "^18.12.0",
"@playwright/test": "^1.34.3",
"@sentry/cli": "^2.13.0",
Expand Down Expand Up @@ -199,7 +200,6 @@
"electron": "^23.1.3",
"electron-builder": "^23.6.0",
"electron-devtools-installer": "^3.2.0",
"electron-notarize": "^1.2.2",
"esbuild-utils": "workspace:*",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-react": "^7.32.2",
Expand Down
33 changes: 22 additions & 11 deletions apps/ledger-live-desktop/scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const platform = require("os").platform();
const { notarize } = require("electron-notarize");
const { notarize } = require("@electron/notarize");
const chalk = require("chalk");
const { spawn } = require("child_process");

require("dotenv").config();
require("debug").enable("electron-notarize");
require("debug").enable("@electron/notarize");

const info = str => {
console.log(chalk.blue(str));
Expand Down Expand Up @@ -38,15 +39,25 @@ async function notarizeApp(context) {
appleIdPassword: APPLEID_PASSWORD,
});
} else {
await notarize({
tool: "notarytool",
appBundleId: "com.ledger.live",
appPath: path,
ascProvider: "EpicDreamSAS",
appleId: APPLEID,
teamId: DEVELOPER_TEAM_ID,
appleIdPassword: APPLEID_PASSWORD,
});
try {
await notarize({
tool: "notarytool",
appBundleId: "com.ledger.live",
appPath: path,
ascProvider: "EpicDreamSAS",
appleId: APPLEID,
teamId: DEVELOPER_TEAM_ID,
appleIdPassword: APPLEID_PASSWORD,
});
} catch (error) {
// Issue with staple
// https://github.com/electron/notarize/issues/109#issuecomment-1213359106
if (error.message?.includes("Failed to staple")) {
spawn(`xcrun`, ["stapler", "staple", path]);
} else {
throw error;
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/ledger-live-desktop/scripts/sign-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ async function azureSign(filePath) {
"-kvs",
AZURE_SECRET,
"-kvc",
"LL20220419-02",
"LL20230519-01",
"-v",
"-tr",
"http://timestamp.digicert.com",
Expand Down

0 comments on commit 8cc2a86

Please sign in to comment.