Skip to content

Commit a3c5b41

Browse files
committed
electron builder fixes
1 parent 2fa7678 commit a3c5b41

File tree

3 files changed

+24
-23
lines changed

3 files changed

+24
-23
lines changed

electron-builder.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ asarUnpack:
3737
win:
3838
icon: "./build/windows/icon.ico"
3939
artifactName: tabby-${version}-portable-${env.ARCH}.${ext}
40-
rfc3161TimeStampServer: http://timestamp.sectigo.com
40+
signtoolOptions:
41+
rfc3161TimeStampServer: http://timestamp.sectigo.com
4142
nsis:
4243
oneClick: false
4344
artifactName: tabby-${version}-setup-${env.ARCH}.${ext}

scripts/build-macos.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ builder({
2828
},
2929
mac: {
3030
identity: !process.env.CI || process.env.CSC_LINK ? undefined : null,
31-
notarize: process.env.APPLE_TEAM_ID ? {
32-
teamId: process.env.APPLE_TEAM_ID,
33-
} : false,
31+
notarize: !!process.env.APPLE_TEAM_ID,
3432
},
3533
npmRebuild: process.env.ARCH !== 'arm64',
3634
publish: process.env.KEYGEN_TOKEN ? [

scripts/build-windows.mjs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,29 @@ builder({
2828
] : undefined,
2929
forceCodeSigning: !!keypair,
3030
win: {
31-
certificateSha1: process.env.SM_CODE_SIGNING_CERT_SHA1_HASH,
32-
publisherName: process.env.SM_PUBLISHER_NAME,
33-
signingHashAlgorithms: ['sha256'],
34-
sign: keypair ? async function (configuration) {
35-
console.log('Signing', configuration)
36-
if (configuration.path) {
37-
try {
38-
const out = execSync(
39-
`smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
40-
)
41-
if (out.toString().includes('FAILED')) {
42-
throw new Error(out.toString())
31+
signtoolOptions: {
32+
certificateSha1: process.env.SM_CODE_SIGNING_CERT_SHA1_HASH,
33+
publisherName: process.env.SM_PUBLISHER_NAME,
34+
signingHashAlgorithms: ['sha256'],
35+
sign: keypair ? async function (configuration) {
36+
console.log('Signing', configuration)
37+
if (configuration.path) {
38+
try {
39+
const out = execSync(
40+
`smctl sign --keypair-alias=${keypair} --input "${String(configuration.path)}"`
41+
)
42+
if (out.toString().includes('FAILED')) {
43+
throw new Error(out.toString())
44+
}
45+
console.log(out.toString())
46+
} catch (e) {
47+
console.error(`Failed to sign ${configuration.path}`)
48+
console.error(e)
49+
process.exit(1)
4350
}
44-
console.log(out.toString())
45-
} catch (e) {
46-
console.error(`Failed to sign ${configuration.path}`)
47-
console.error(e)
48-
process.exit(1)
4951
}
50-
}
51-
} : undefined,
52+
} : undefined,
53+
},
5254
},
5355
},
5456

0 commit comments

Comments
 (0)