Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLD Signing on macOS + Windows update #3779

Merged
merged 3 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/ledger-live-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
"@babel/preset-env": "^7.15.8",
"@babel/preset-react": "^7.13.13",
"@babel/preset-typescript": "^7.15.0",
"@electron/notarize": "^1.2.4",
"@octokit/rest": "^18.12.0",
"@playwright/test": "^1.34.3",
"@sentry/cli": "^2.13.0",
Expand Down Expand Up @@ -188,10 +189,10 @@
"babel-plugin-module-resolver": "^4.1.0",
"chalk": "^4.1.2",
"cross-env": "^7.0.3",
"debug": "^4.3.4",
"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
54 changes: 37 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.