mirror of https://github.com/keeweb/keeweb.git
Add --no-sign arg to toggle code signing in Grunt
This commit is contained in:
parent
de6255b388
commit
9c32293fa8
13
Gruntfile.js
13
Gruntfile.js
|
@ -3,19 +3,24 @@
|
|||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const debug = require('debug');
|
||||
const os = require('os');
|
||||
|
||||
const webpackConfig = require('./build/webpack.config');
|
||||
const webpackConfigTest = require('./test/test.webpack.config');
|
||||
const pkg = require('./package.json');
|
||||
|
||||
const skipCodeSigning = process.argv.some(arg => arg.startsWith('--no-sign'));
|
||||
let codeSignConfig;
|
||||
if (os.platform() === 'darwin') {
|
||||
|
||||
if (!skipCodeSigning) {
|
||||
try {
|
||||
codeSignConfig = require('../keys/codesign');
|
||||
} catch (err) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn('Code signing config missing - signing the macOS build will be skipped.');
|
||||
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`'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -93,11 +93,11 @@
|
|||
},
|
||||
"scripts": {
|
||||
"start": "grunt",
|
||||
"test": "grunt test",
|
||||
"test": "grunt test --no-sign",
|
||||
"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",
|
||||
"dev": "grunt dev --no-sign",
|
||||
"babel-helpers": "babel-external-helpers -l 'slicedToArray,toConsumableArray,defineProperty,typeof' -t global > app/lib/babel-helpers.js"
|
||||
},
|
||||
"author": {
|
||||
|
|
Loading…
Reference in New Issue