@@ -118,7 +118,8 @@ exports.default = async function(context) {
118118 const helperPath = path . join ( helpersPath , helper ) ;
119119 if ( fs . statSync ( helperPath ) . isFile ( ) && ! helper . endsWith ( '.plist' ) ) {
120120 try {
121- execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " --options runtime "${ helperPath } "` , {
121+ // Don't use --options runtime for MAS builds (that's for Developer ID only)
122+ execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " "${ helperPath } "` , {
122123 stdio : 'inherit'
123124 } ) ;
124125 console . log ( `✅ Re-signed helper: ${ helper } ` ) ;
@@ -133,8 +134,8 @@ exports.default = async function(context) {
133134 helperApps . sort ( ( a , b ) => b . split ( path . sep ) . length - a . split ( path . sep ) . length ) ;
134135 for ( const helperApp of helperApps ) {
135136 try {
136- // Sign the helper app
137- execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " --options runtime "${ helperApp } "` , {
137+ // Sign the helper app (no --options runtime for MAS builds)
138+ execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " "${ helperApp } "` , {
138139 stdio : 'inherit'
139140 } ) ;
140141
@@ -154,25 +155,25 @@ exports.default = async function(context) {
154155 const electronFrameworkPath = path . join ( frameworksPath , 'Electron Framework.framework' ) ;
155156 const electronFrameworkExecutable = path . join ( electronFrameworkPath , 'Versions' , 'A' , 'Electron Framework' ) ;
156157 if ( fs . existsSync ( electronFrameworkExecutable ) ) {
157- // Sign the executable inside the framework first
158- execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " --options runtime "${ electronFrameworkExecutable } "` , {
158+ // Sign the executable inside the framework first (no --options runtime for MAS)
159+ execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " "${ electronFrameworkExecutable } "` , {
159160 stdio : 'inherit'
160161 } ) ;
161162 // Then sign the framework bundle
162- execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " --options runtime "${ electronFrameworkPath } "` , {
163+ execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " "${ electronFrameworkPath } "` , {
163164 stdio : 'inherit'
164165 } ) ;
165166 console . log ( '✅ Re-signed Electron Framework (executable and bundle)' ) ;
166167 } else if ( fs . existsSync ( electronFrameworkPath ) ) {
167168 // Fallback: sign the framework bundle if executable path doesn't exist
168- execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " --options runtime "${ electronFrameworkPath } "` , {
169+ execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlementsInherit } " "${ electronFrameworkPath } "` , {
169170 stdio : 'inherit'
170171 } ) ;
171172 console . log ( '✅ Re-signed Electron Framework (bundle only)' ) ;
172173 }
173174
174- // Sign main app bundle last
175- execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlements } " --options runtime "${ appBundlePath } "` , {
175+ // Sign main app bundle last (no --options runtime for MAS builds)
176+ execSync ( `codesign --force --sign "${ identity } " --entitlements "${ entitlements } " "${ appBundlePath } "` , {
176177 stdio : 'inherit'
177178 } ) ;
178179 console . log ( '✅ App bundle re-signed successfully' ) ;
0 commit comments