Skip to content

Commit

Permalink
electron builder fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugeny committed Jan 22, 2025
1 parent 2fa7678 commit a3c5b41
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 23 deletions.
3 changes: 2 additions & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ asarUnpack:
win:
icon: "./build/windows/icon.ico"
artifactName: tabby-${version}-portable-${env.ARCH}.${ext}
rfc3161TimeStampServer: http://timestamp.sectigo.com
signtoolOptions:
rfc3161TimeStampServer: http://timestamp.sectigo.com
nsis:
oneClick: false
artifactName: tabby-${version}-setup-${env.ARCH}.${ext}
Expand Down
4 changes: 1 addition & 3 deletions scripts/build-macos.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ builder({
},
mac: {
identity: !process.env.CI || process.env.CSC_LINK ? undefined : null,
notarize: process.env.APPLE_TEAM_ID ? {
teamId: process.env.APPLE_TEAM_ID,
} : false,
notarize: !!process.env.APPLE_TEAM_ID,
},
npmRebuild: process.env.ARCH !== 'arm64',
publish: process.env.KEYGEN_TOKEN ? [
Expand Down
40 changes: 21 additions & 19 deletions scripts/build-windows.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,29 @@ builder({
] : undefined,
forceCodeSigning: !!keypair,
win: {
certificateSha1: process.env.SM_CODE_SIGNING_CERT_SHA1_HASH,
publisherName: process.env.SM_PUBLISHER_NAME,
signingHashAlgorithms: ['sha256'],
sign: keypair ? async function (configuration) {
console.log('Signing', configuration)
if (configuration.path) {
try {
const out = execSync(
`smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
)
if (out.toString().includes('FAILED')) {
throw new Error(out.toString())
signtoolOptions: {
certificateSha1: process.env.SM_CODE_SIGNING_CERT_SHA1_HASH,
publisherName: process.env.SM_PUBLISHER_NAME,
signingHashAlgorithms: ['sha256'],
sign: keypair ? async function (configuration) {
console.log('Signing', configuration)
if (configuration.path) {
try {
const out = execSync(
`smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
)
if (out.toString().includes('FAILED')) {
throw new Error(out.toString())
}
console.log(out.toString())
} catch (e) {
console.error(`Failed to sign ${configuration.path}`)
console.error(e)
process.exit(1)
}
console.log(out.toString())
} catch (e) {
console.error(`Failed to sign ${configuration.path}`)
console.error(e)
process.exit(1)
}
}
} : undefined,
} : undefined,
},
},
},

Expand Down

0 comments on commit a3c5b41

Please sign in to comment.