mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-25 17:25:14 +03:00
osx64 .zip notarization fix
This commit is contained in:
parent
500b85392d
commit
ad4eea10ec
1 changed files with 26 additions and 5 deletions
31
gulpfile.js
31
gulpfile.js
|
@ -408,18 +408,39 @@ gulp.task('release-osx64', function(done) {
|
|||
archive.directory(src, 'INAV Configurator.app');
|
||||
output.on('close', function() {
|
||||
if (getArguments().notarize) {
|
||||
console.log('Notarizing DMG file: ' + zipFilename);
|
||||
const notarizeArgs = ['macapptool', '-v', '1', 'notarize'];
|
||||
console.log('Notarizing ZIP file: ' + zipFilename);
|
||||
const notarizeArgs = ['xcrun', 'notarytool', 'submit'];
|
||||
notarizeArgs.push(zipFilename);
|
||||
const notarizationUsername = getArguments()['notarization-username'];
|
||||
if (notarizationUsername) {
|
||||
notarizeArgs.push('-u', notarizationUsername)
|
||||
notarizeArgs.push('--apple-id', notarizationUsername)
|
||||
} else {
|
||||
throw new Error('Missing notarization username');
|
||||
}
|
||||
const notarizationPassword = getArguments()['notarization-password'];
|
||||
if (notarizationPassword) {
|
||||
notarizeArgs.push('-p', notarizationPassword)
|
||||
notarizeArgs.push('--password', notarizationPassword)
|
||||
} else {
|
||||
throw new Error('Missing notarization password');
|
||||
}
|
||||
const notarizationTeamId = getArguments()['notarization-team-id'];
|
||||
if (notarizationTeamId) {
|
||||
notarizeArgs.push('--team-id', notarizationTeamId)
|
||||
} else {
|
||||
throw new Error('Missing notarization Team ID');
|
||||
}
|
||||
notarizeArgs.push('--wait');
|
||||
|
||||
const notarizationWebhook = getArguments()['notarization-webhook'];
|
||||
if (notarizationWebhook) {
|
||||
notarizeArgs.push('--webhook', notarizationWebhook);
|
||||
}
|
||||
notarizeArgs.push(zipFilename)
|
||||
execSync.apply(this, notarizeArgs);
|
||||
|
||||
console.log('Stapling ZIP file: ' + zipFilename);
|
||||
const stapleArgs = ['macapptool', '-v', '1', 'staple'];
|
||||
stapleArgs.push(zipFilename)
|
||||
execSync.apply(this, stapleArgs);
|
||||
}
|
||||
done();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue