@electron/notarize
Advanced tools
Comparing version 2.2.1 to 2.3.0
@@ -58,2 +58,7 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const fileExt = path.extname(opts.appPath); | ||
if (fileExt === '.dmg' || fileExt === '.pkg') { | ||
d('skipping codesign check for dmg or pkg file'); | ||
return; | ||
} | ||
const [codesignResult, codesignInfo] = yield Promise.all([codesign(opts), codesignDisplay(opts)]); | ||
@@ -60,0 +65,0 @@ let error = ''; |
@@ -86,15 +86,23 @@ "use strict"; | ||
return yield (0, helpers_1.withTempDir)((dir) => __awaiter(this, void 0, void 0, function* () { | ||
const zipPath = path.resolve(dir, `${path.parse(opts.appPath).name}.zip`); | ||
d('zipping application to:', zipPath); | ||
const zipResult = yield (0, spawn_1.spawn)('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), zipPath], { | ||
cwd: path.dirname(opts.appPath), | ||
}); | ||
if (zipResult.code !== 0) { | ||
throw new Error(`Failed to zip application, exited with code: ${zipResult.code}\n\n${zipResult.output}`); | ||
const fileExt = path.extname(opts.appPath); | ||
let filePath; | ||
if (fileExt === '.dmg' || fileExt === '.pkg') { | ||
filePath = path.resolve(dir, opts.appPath); | ||
d('attempting to upload file to Apple: ', filePath); | ||
} | ||
d('zip succeeded, attempting to upload to Apple'); | ||
else { | ||
filePath = path.resolve(dir, `${path.parse(opts.appPath).name}.zip`); | ||
d('zipping application to:', filePath); | ||
const zipResult = yield (0, spawn_1.spawn)('ditto', ['-c', '-k', '--sequesterRsrc', '--keepParent', path.basename(opts.appPath), filePath], { | ||
cwd: path.dirname(opts.appPath), | ||
}); | ||
if (zipResult.code !== 0) { | ||
throw new Error(`Failed to zip application, exited with code: ${zipResult.code}\n\n${zipResult.output}`); | ||
} | ||
d('zip succeeded, attempting to upload to Apple'); | ||
} | ||
const notarizeArgs = [ | ||
'notarytool', | ||
'submit', | ||
zipPath, | ||
filePath, | ||
...authorizationArgs(opts), | ||
@@ -101,0 +109,0 @@ '--wait', |
{ | ||
"name": "@electron/notarize", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Notarize your Electron app", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
64507
811