fix: Notarize cleanup
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -27,3 +27,4 @@ dist-ssr
|
|||||||
.env
|
.env
|
||||||
/.mcp.json
|
/.mcp.json
|
||||||
/nul
|
/nul
|
||||||
|
/.vscode/
|
||||||
|
|||||||
7
.vscode/extensions.json
vendored
7
.vscode/extensions.json
vendored
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"recommendations": [
|
|
||||||
"dbaeumer.vscode-eslint",
|
|
||||||
"esbenp.prettier-vscode",
|
|
||||||
"editorconfig.editorconfig"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -3,32 +3,20 @@ const { notarize } = require('@electron/notarize');
|
|||||||
exports.default = async function notarizing(context) {
|
exports.default = async function notarizing(context) {
|
||||||
const { electronPlatformName, appOutDir } = context;
|
const { electronPlatformName, appOutDir } = context;
|
||||||
|
|
||||||
// Only notarize macOS DMG builds (not MAS builds - those go through App Store Connect)
|
|
||||||
if (electronPlatformName !== 'darwin') {
|
if (electronPlatformName !== 'darwin') {
|
||||||
console.log(`Skipping notarization: platform is ${electronPlatformName}, not darwin`);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip notarization if credentials are not provided
|
|
||||||
const appleId = process.env.APPLE_ID;
|
const appleId = process.env.APPLE_ID;
|
||||||
const appleIdPassword = process.env.APPLE_ID_PASSWORD;
|
const appleIdPassword = process.env.APPLE_ID_PASSWORD;
|
||||||
const teamId = process.env.APPLE_TEAM_ID;
|
const teamId = process.env.APPLE_TEAM_ID;
|
||||||
|
|
||||||
if (!appleId || !appleIdPassword || !teamId) {
|
if (!appleId || !appleIdPassword || !teamId) {
|
||||||
console.log('Skipping notarization: Apple ID credentials not provided');
|
|
||||||
console.log(` APPLE_ID: ${appleId ? 'SET' : 'NOT SET'}`);
|
|
||||||
console.log(` APPLE_ID_PASSWORD: ${appleIdPassword ? 'SET' : 'NOT SET'}`);
|
|
||||||
console.log(` APPLE_TEAM_ID: ${teamId ? 'SET' : 'NOT SET'}`);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const appName = context.packager.appInfo.productFilename;
|
const appName = context.packager.appInfo.productFilename;
|
||||||
|
|
||||||
console.log(`Starting notarization for ${appName}...`);
|
|
||||||
console.log(` App Bundle ID: com.karmaa.termix`);
|
|
||||||
console.log(` App Path: ${appOutDir}/${appName}.app`);
|
|
||||||
console.log(` Team ID: ${teamId}`);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await notarize({
|
await notarize({
|
||||||
appBundleId: 'com.karmaa.termix',
|
appBundleId: 'com.karmaa.termix',
|
||||||
@@ -37,11 +25,7 @@ exports.default = async function notarizing(context) {
|
|||||||
appleIdPassword: appleIdPassword,
|
appleIdPassword: appleIdPassword,
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(`✅ Successfully notarized ${appName}`);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('❌ Notarization failed:', error);
|
console.error('Notarization failed:', error);
|
||||||
console.error('Build will continue, but app may show Gatekeeper warnings');
|
|
||||||
// Don't fail the build if notarization fails
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user