mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-06-16 11:14:48 -04:00
checkPlugins fix travis and include contributing.md
This commit is contained in:
parent
239a0bccbd
commit
ee0a37f96c
2 changed files with 144 additions and 0 deletions
|
@ -291,6 +291,17 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
|||
}
|
||||
}
|
||||
|
||||
if (files.indexOf('contributing') === -1 && files.indexOf('contributing.md') === -1) {
|
||||
console.warn('CONTRIBUTING.md file not found, please create');
|
||||
if (autoFix) {
|
||||
console.log('Autofixing missing CONTRIBUTING.md file, please edit the CONTRIBUTING.md file further to include plugin specific details.');
|
||||
let contributing = fs.readFileSync('bin/plugins/lib/CONTRIBUTING.md', {encoding: 'utf8', flag: 'r'});
|
||||
contributing = contributing.replace(/\[plugin_name\]/g, pluginName);
|
||||
fs.writeFileSync(`${pluginPath}/CONTRIBUTING.md`, contributing);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (files.indexOf('readme') !== -1 && files.indexOf('readme.md') !== -1) {
|
||||
const readme = fs.readFileSync(`${pluginPath}/${readMeFileName}`, {encoding: 'utf8', flag: 'r'});
|
||||
if (readme.toLowerCase().indexOf('license') === -1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue