option to skip code signing on Windows

This commit is contained in:
antelle 2020-06-02 12:41:30 +02:00
parent ec5bacd951
commit 17fbf9188d
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 7 additions and 2 deletions

View File

@ -30,7 +30,8 @@ module.exports = function (grunt) {
zipCommentPlaceholderPart + '.'.repeat(512 - zipCommentPlaceholderPart.length);
const electronVersion = pkg.dependencies.electron.replace(/^\D/, '');
const skipSign = grunt.option('skip-sign');
const getCodeSignConfig = () => (skipSign ? undefined : require('./keys/codesign.json'));
const getCodeSignConfig = () =>
skipSign ? { identities: {} } : require('./keys/codesign.json');
const webpackOptions = {
date,

View File

@ -13,7 +13,11 @@ module.exports = function (grunt) {
const opt = this.options();
for (const [file, name] of Object.entries(opt.files)) {
await signFile(file, name, opt);
if (!opt.windows && grunt.option('skip-sign')) {
grunt.log.writeln(`Skipped code-signing: ${file}`);
} else {
await signFile(file, name, opt);
}
}
done();