Skip to content

Commit

Permalink
fix: add sign limit
Browse files Browse the repository at this point in the history
  • Loading branch information
HSunboy committed Dec 3, 2024
1 parent 6e3a51e commit 94935e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/client/sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,23 @@ function walkSync(currentDirPath) {
});
return files;
}
let count = 0;
async function codesign(src) {
const cert = 'Developer ID Application: Beijing OceanBase Technology Co., Ltd. (QWQ3HBA8MF)'
const cmd = `codesign --force --timestamp --options runtime --entitlements ./node_modules/electron-builder-notarize/entitlements.mac.inherit.plist --sign "${cert}" ${src}`;
if (count > 30) {
await new Promise((resolve )=> {
setTimeout(() => {
resolve(true)
}, 10000);
})
count = 0;
}
try {
console.log(
execSync(cmd)?.toString()
)
count++;
} catch (e) {
console.log('error: ', e)
console.log('retry:', src)
Expand Down

0 comments on commit 94935e5

Please sign in to comment.