mirror of https://github.com/keeweb/keeweb.git
removed --no-sign
This commit is contained in:
parent
73b7880d73
commit
668bb9b5d5
59
Gruntfile.js
59
Gruntfile.js
|
@ -29,22 +29,7 @@ module.exports = function(grunt) {
|
|||
const zipCommentPlaceholder =
|
||||
zipCommentPlaceholderPart + '.'.repeat(512 - zipCommentPlaceholderPart.length);
|
||||
const electronVersion = pkg.dependencies.electron.replace(/^\D/, '');
|
||||
|
||||
const skipCodeSigning = grunt.option('no-sign');
|
||||
let codeSignConfig;
|
||||
|
||||
if (!skipCodeSigning) {
|
||||
try {
|
||||
codeSignConfig = require('../keys/codesign');
|
||||
} catch (err) {
|
||||
throw new Error(
|
||||
'Unable to load code signing config from ../keys/codesign.\n' +
|
||||
'This is needed for production builds targeting macOS.\n' +
|
||||
'For development builds, run with the `--no-sign` arg to skip code signing,\n' +
|
||||
'e.g. `npm start -- --no-sign`'
|
||||
);
|
||||
}
|
||||
}
|
||||
const getCodeSingConfig = () => require('../keys/codesign');
|
||||
|
||||
const webpackOptions = {
|
||||
date,
|
||||
|
@ -316,22 +301,24 @@ module.exports = function(grunt) {
|
|||
appBundleId: 'net.antelle.keeweb',
|
||||
appCategoryType: 'public.app-category.productivity',
|
||||
extendInfo: 'package/osx/extend.plist',
|
||||
...(codeSignConfig
|
||||
? {
|
||||
osxSign: {
|
||||
identity: codeSignConfig.identities.app,
|
||||
hardenedRuntime: true,
|
||||
entitlements: 'package/osx/entitlements.mac.plist',
|
||||
'entitlements-inherit': 'package/osx/entitlements.mac.plist',
|
||||
'gatekeeper-assess': false
|
||||
},
|
||||
osxNotarize: {
|
||||
appleId: codeSignConfig.appleId,
|
||||
appleIdPassword: '@keychain:AC_PASSWORD',
|
||||
ascProvider: codeSignConfig.teamId
|
||||
}
|
||||
}
|
||||
: {}),
|
||||
osxSign: {
|
||||
get identity() {
|
||||
return getCodeSingConfig().identities.app;
|
||||
},
|
||||
hardenedRuntime: true,
|
||||
entitlements: 'package/osx/entitlements.mac.plist',
|
||||
'entitlements-inherit': 'package/osx/entitlements.mac.plist',
|
||||
'gatekeeper-assess': false
|
||||
},
|
||||
osxNotarize: {
|
||||
get appleId() {
|
||||
return getCodeSingConfig().appleId;
|
||||
},
|
||||
appleIdPassword: '@keychain:AC_PASSWORD',
|
||||
get ascProvider() {
|
||||
return getCodeSingConfig().teamId;
|
||||
}
|
||||
},
|
||||
afterCopy: [
|
||||
(buildPath, electronVersion, platform, arch, callback) => {
|
||||
if (path.basename(buildPath) !== 'app') {
|
||||
|
@ -590,9 +577,13 @@ module.exports = function(grunt) {
|
|||
},
|
||||
'sign-exe': {
|
||||
options: {
|
||||
// algo: 'SHA256',
|
||||
url: pkg.homepage,
|
||||
...(codeSignConfig ? codeSignConfig.windows : {})
|
||||
get vm() {
|
||||
return getCodeSingConfig().windowsVM;
|
||||
},
|
||||
get certHash() {
|
||||
return getCodeSingConfig().microsoftCertHash;
|
||||
}
|
||||
},
|
||||
'win32-build-x64': {
|
||||
options: {
|
||||
|
|
|
@ -43,14 +43,14 @@ module.exports = function(grunt) {
|
|||
const cmd = 'VBoxManage';
|
||||
const args = [
|
||||
'guestcontrol',
|
||||
opt.vmName,
|
||||
opt.vm.name,
|
||||
'--username',
|
||||
opt.vmUser,
|
||||
opt.vm.user,
|
||||
'--password',
|
||||
opt.vmPass,
|
||||
opt.vm.pass,
|
||||
'run',
|
||||
opt.vmExec,
|
||||
`sign /t ${timeServer} /d "${name}" /du ${opt.url} ${opt.vmShare}${fileNameWithoutFolder}`
|
||||
opt.vm.exec,
|
||||
`sign /t ${timeServer} /d "${name}" /du ${opt.url} ${opt.vm.share}${fileNameWithoutFolder}`
|
||||
];
|
||||
// the algo is not working: "/fd ${opt.algo}"
|
||||
let res = spawnSync(cmd, args);
|
||||
|
|
|
@ -95,11 +95,11 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "grunt",
|
||||
"test": "grunt test --no-sign",
|
||||
"test": "grunt test",
|
||||
"postinstall": "cd desktop && npm install",
|
||||
"build-beta": "grunt --beta && cp dist/index.html ../keeweb-beta/index.html && cd ../keeweb-beta && git add index.html && git commit -a -m 'beta' && git push origin master",
|
||||
"electron": "cross-env ELECTRON_DISABLE_SECURITY_WARNINGS=1 electron desktop --htmlpath=http://localhost:8085",
|
||||
"dev": "grunt dev --no-sign",
|
||||
"dev": "grunt dev",
|
||||
"babel-helpers": "babel-external-helpers -l 'slicedToArray,toConsumableArray,defineProperty,typeof' -t global > app/lib/babel-helpers.js"
|
||||
},
|
||||
"author": {
|
||||
|
|
Loading…
Reference in New Issue