This commit is contained in:
antelle 2020-05-24 18:56:50 +02:00
parent d9134e7085
commit ae9d139754
No known key found for this signature in database
GPG Key ID: 63C9777AAB7C563C
2 changed files with 21 additions and 9 deletions

8
.prettierrc Normal file
View File

@ -0,0 +1,8 @@
{
"tabWidth": 4,
"singleQuote": true,
"printWidth": 100,
"trailingComma": "none",
"quoteProps": "preserve",
"endOfLine": "auto"
}

View File

@ -34,7 +34,9 @@ for (const plugin of data.plugins) {
if (plugin.manifest.locale) { if (plugin.manifest.locale) {
continue; continue;
} }
plugin.manifest = JSON.parse(fs.readFileSync(`docs/plugins/${plugin.manifest.name}/manifest.json`, 'utf8')); plugin.manifest = JSON.parse(
fs.readFileSync(`docs/plugins/${plugin.manifest.name}/manifest.json`, 'utf8')
);
} }
console.log('Checking for changes...'); console.log('Checking for changes...');
@ -53,11 +55,13 @@ console.log('Signing...');
const dataToSign = Buffer.from(JSON.stringify(data, null, 2)); const dataToSign = Buffer.from(JSON.stringify(data, null, 2));
sign(dataToSign).then(signature => { sign(dataToSign)
data.signature = signature.toString('base64'); .then(signature => {
fs.writeFileSync('docs/plugins.json', JSON.stringify(data, null, 2)); data.signature = signature.toString('base64');
console.log('Done'); fs.writeFileSync('docs/plugins.json', JSON.stringify(data, null, 2));
}).catch(err => { console.log('Done');
console.error('Sign error', err); })
process.exit(1); .catch(err => {
}); console.error('Sign error', err);
process.exit(1);
});