Skip to content

Commit

Permalink
feat: notarytool 사용을 위해 teamID 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
조현욱[SW교육플랫폼개발] committed Mar 27, 2024
1 parent 6cad836 commit 3357113
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 5 additions & 3 deletions scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { notarize } = require('electron-notarize');

module.exports = async function notarizing(notarizeOption) {
const { appBundleId, appPath, appleId, appleIdPassword } = notarizeOption;
const { appBundleId, appPath, appleId, appleIdPassword, teamId } = notarizeOption;
const { NOTARIZE } = process.env;

// noinspection EqualityComparisonWithCoercionJS
Expand All @@ -10,8 +10,8 @@ module.exports = async function notarizing(notarizeOption) {
return;
}

if (!appleId || !appleIdPassword) {
console.log(' • APPLE_ID or APPLE_PASSWORD not found. will be skipped this process');
if (!appleId || !appleIdPassword || !teamId) {
console.log(' • APPLE_ID or APPLE_PASSWORD or TEAM_ID not found. will be skipped this process');
return;
}

Expand All @@ -21,9 +21,11 @@ module.exports = async function notarizing(notarizeOption) {
appleId: ${appleId}`,
);
return await notarize({
tool: 'notarytool',
appBundleId,
appPath,
appleId,
teamId,
appleIdPassword,
});
};
3 changes: 2 additions & 1 deletion scripts/notarize_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const notarize = require('./notarize');
module.exports = async function notarizing(context) {
const { appOutDir } = context;
const { electronPlatformName } = context;
const { APPLE_ID, APPLE_PASSWORD } = process.env;
const { APPLE_ID, APPLE_PASSWORD, TEAM_ID } = process.env;

if (electronPlatformName !== 'darwin') {
return;
Expand All @@ -15,6 +15,7 @@ module.exports = async function notarizing(context) {
appBundleId: 'org.playentry.entry',
appPath: `${appOutDir}/${appName}.app`,
appleId: APPLE_ID,
teamId: TEAM_ID,
appleIdPassword: APPLE_PASSWORD,
});
};
3 changes: 2 additions & 1 deletion scripts/notarize_installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ const notarize = require('./notarize');

module.exports = async (context) => {
const { artifactPaths } = context;
const { APPLE_ID, APPLE_PASSWORD } = process.env;
const { APPLE_ID, APPLE_PASSWORD, TEAM_ID } = process.env;

return await Promise.all(artifactPaths.map(async (artifactPath) => {
if (path.extname(artifactPath) === '.pkg') {
return await notarize({
appBundleId: 'org.playentry.entry',
appPath: artifactPath,
appleId: APPLE_ID,
teamId: TEAM_ID,
appleIdPassword: APPLE_PASSWORD,
});
}
Expand Down

0 comments on commit 3357113

Please sign in to comment.