Skip to content

Commit

Permalink
Merge pull request #33 from binance/fix_release_issue
Browse files Browse the repository at this point in the history
Fix release issue
  • Loading branch information
alplabin authored Apr 19, 2024
2 parents 2b826f9 + 5be77d1 commit 2f574f0
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions config/electron-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,47 @@ 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',
appPath: `${appOutDir}/${appName}.app`,
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

0 comments on commit 2f574f0

Please sign in to comment.