Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Composer/packages/electron-server/scripts/sign-mac.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const fs = require('fs');
const path = require('path');
// eslint-disable-next-line security/detect-child-process
const { execSync } = require('child_process');

const glob = require('globby');

const { log } = require('./common');
Expand Down Expand Up @@ -86,13 +87,12 @@ try {
execSync(`security unlock-keychain -p pwd ${keychainPath}`, { stdio: 'inherit' });

log.info(`echo ********* | base64 -D > ${certPath}`);
execSync(`echo ${process.env.DEV_CERT} | base64 -D > ${certPath}`, { stdio: 'inherit' });
execSync(`echo "$DEV_CERT" | base64 -D > ${certPath}`, { stdio: 'inherit' });

log.info(`security import ${certPath} -k ${keychainPath} -P "*********" -T /usr/bin/codesign`);
execSync(
`security import ${certPath} -k ${keychainPath} -P "${process.env.DEV_CERT_PASSWORD}" -T /usr/bin/codesign`,
{ stdio: 'inherit' }
);
execSync(`security import ${certPath} -k ${keychainPath} -P "$DEV_CERT_PASSWORD" -T /usr/bin/codesign`, {
stdio: 'inherit',
});

log.info(`security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd ${keychainPath}`);
execSync(`security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd ${keychainPath}`, {
Expand All @@ -114,13 +114,13 @@ try {

for (const lib of dylibs) {
log.info(`codesign -s ******* --timestamp=none --force "${path.join(fwPath, lib)}"`);
execSync(`codesign -s ${process.env.DEV_CERT_ID} --timestamp=none --force "${path.join(fwPath, lib)}"`, {
execSync(`codesign -s $DEV_CERT_ID --timestamp=none --force "${path.join(fwPath, lib)}"`, {
stdio: 'inherit',
});
}

log.info(`codesign -s ******* --timestamp=none --force "${fwPath}"`);
execSync(`codesign -s ${process.env.DEV_CERT_ID} --timestamp=none --force "${fwPath}"`, {
execSync(`codesign -s $DEV_CERT_ID --timestamp=none --force "${fwPath}"`, {
stdio: 'inherit',
});
}
Expand All @@ -136,7 +136,7 @@ try {
`codesign -s ******* --timestamp=none --force --options runtime --entitlements "${bundle.entitlements}" "${bundle.path}"`
);
execSync(
`codesign -s ${process.env.DEV_CERT_ID} --timestamp=none --force --options runtime --entitlements "${bundle.entitlements}" "${bundle.path}"`,
`codesign -s $DEV_CERT_ID --timestamp=none --force --options runtime --entitlements "${bundle.entitlements}" "${bundle.path}"`,
{ stdio: 'inherit' }
);
}
Expand Down