mirror of
https://github.com/kopia/kopia.git
synced 2026-03-26 01:51:20 -04:00
* chore(ci): enforce consistent formatting of KopiaUI code * fix htmlui_changelog.sh * fix
33 lines
941 B
JavaScript
33 lines
941 B
JavaScript
import "dotenv/config";
|
|
import { notarize } from "@electron/notarize";
|
|
import fs from "fs";
|
|
import crypto from "crypto";
|
|
|
|
export default async function notarizing(context) {
|
|
const { electronPlatformName, appOutDir } = context;
|
|
if (electronPlatformName !== "darwin") {
|
|
return;
|
|
}
|
|
|
|
if (!process.env.KOPIA_UI_NOTARIZE) {
|
|
console.log("Not notarizing because KOPIA_UI_NOTARIZE is not set");
|
|
return;
|
|
}
|
|
|
|
const appName = context.packager.appInfo.productFilename;
|
|
|
|
console.log("Submitting app for Apple notarization...");
|
|
let timerId = setInterval(() => {
|
|
console.log("Still waiting for notarization response...");
|
|
}, 30000);
|
|
let x = await notarize({
|
|
appBundleId: "io.kopia.ui",
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
appleApiIssuer: process.env.APPLE_API_ISSUER,
|
|
appleApiKeyId: process.env.APPLE_API_KEY_ID,
|
|
appleApiKey: process.env.APPLE_API_KEY,
|
|
});
|
|
clearTimeout(timerId);
|
|
return x;
|
|
}
|