Skip to content

Commit

Permalink
feat: notarytool 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
조현욱[SW교육플랫폼개발] committed Mar 29, 2024
1 parent c0e30f6 commit 79db2ea
Show file tree
Hide file tree
Showing 5 changed files with 573 additions and 451 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"cross-env": "^5.1.3",
"electron": "12.0.2",
"electron-builder": "^22.8.0",
"electron-notarize": "^0.2.1",
"electron-rebuild": "2.3.5",
"electron-notarize": "^1.0.0",
"electron-rebuild": "3.2.8",
"eslint": "^6.8.0",
"file-loader": "^5.0.2",
"immer": "^4.0.2",
Expand Down
6 changes: 4 additions & 2 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,7 +10,7 @@ module.exports = async function notarizing(notarizeOption) {
return;
}

if (!appleId || !appleIdPassword) {
if (!appleId || !appleIdPassword || !teamId) {
console.log(' • APPLE_ID or APPLE_PASSWORD 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.entryhw',
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.entryhw',
appPath: artifactPath,
appleId: APPLE_ID,
teamId: TEAM_ID,
appleIdPassword: APPLE_PASSWORD,
});
}
Expand Down
Loading

0 comments on commit 79db2ea

Please sign in to comment.