From 5be77d143015c2f448004c13652e704c0689e30a Mon Sep 17 00:00:00 2001 From: alplabin <122352306+alplabin@users.noreply.github.com> Date: Fri, 19 Apr 2024 13:21:34 +0900 Subject: [PATCH] Fix release issue --- config/electron-builder.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/config/electron-builder.js b/config/electron-builder.js index 941b551..d4c90e4 100644 --- a/config/electron-builder.js +++ b/config/electron-builder.js @@ -7,32 +7,33 @@ const config = { mac: { target: { target: 'dmg', - arch: ['universal'], - }, + arch: ['universal'] + } }, win: { - target: 'nsis', + target: 'nsis' }, linux: { - target: 'AppImage', + target: 'AppImage' }, afterSign: async (context) => { - const { electronPlatformName, appOutDir } = context; + const { electronPlatformName, appOutDir } = context if (electronPlatformName !== 'darwin') { - return; + return } if ( !process.env.NOTARIZE_APPLE_ID || - !process.env.NOTARIZE_APPLE_PASSWORD + !process.env.NOTARIZE_APPLE_PASSWORD || + !process.env.NOTARIZE_APPLE_TEAM_ID ) { console.log( - 'Skip notarizing, cannot find NOTARIZE_APPLE_ID and NOTARIZE_APPLE_PASSWORD env' - ); - return; + 'Skip notarizing, cannot find NOTARIZE_APPLE_ID or NOTARIZE_APPLE_PASSWORD or NOTARIZE_APPLE_TEAM_ID env' + ) + return } - const appName = context.packager.appInfo.productFilename; + const appName = context.packager.appInfo.productFilename return await notarize({ appBundleId: 'com.binance.AsymmetricKeyGenerator', @@ -40,12 +41,13 @@ const config = { appleId: process.env.NOTARIZE_APPLE_ID, appleIdPassword: process.env.NOTARIZE_APPLE_PASSWORD, ascProvider: process.env.NOTARIZE_APPLE_TEAM_ID, - }); - }, -}; + teamId: process.env.NOTARIZE_APPLE_TEAM_ID + }) + } +} if (os.platform() === 'win32' && process.env.WIN_CERTIFICATE_SUBJECT_NAME) { - config.win.certificateSubjectName = process.env.WIN_CERTIFICATE_SUBJECT_NAME; + config.win.certificateSubjectName = process.env.WIN_CERTIFICATE_SUBJECT_NAME } -module.exports = config; +module.exports = config