mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
checkPlugin: Delete Travis badge from README.md template
This commit is contained in:
parent
2c05de7033
commit
d81546ad7b
2 changed files with 1 additions and 22 deletions
|
@ -138,7 +138,6 @@ if (autoPush) {
|
||||||
|
|
||||||
// some files we need to know the actual file name. Not compulsory but might help in the future.
|
// some files we need to know the actual file name. Not compulsory but might help in the future.
|
||||||
const readMeFileName = files.filter((f) => f === 'README' || f === 'README.md')[0];
|
const readMeFileName = files.filter((f) => f === 'README' || f === 'README.md')[0];
|
||||||
let repository;
|
|
||||||
|
|
||||||
if (!files.includes('.git')) throw new Error('No .git folder, aborting');
|
if (!files.includes('.git')) throw new Error('No .git folder, aborting');
|
||||||
prepareRepo();
|
prepareRepo();
|
||||||
|
@ -155,16 +154,6 @@ if (autoPush) {
|
||||||
await fsp.readFile(`${pluginPath}/package.json`, {encoding: 'utf8', flag: 'r'});
|
await fsp.readFile(`${pluginPath}/package.json`, {encoding: 'utf8', flag: 'r'});
|
||||||
const parsedPackageJSON = JSON.parse(packageJSON);
|
const parsedPackageJSON = JSON.parse(packageJSON);
|
||||||
|
|
||||||
if (!packageJSON.toLowerCase().includes('repository')) {
|
|
||||||
console.warn('No repository in package.json');
|
|
||||||
if (autoFix) {
|
|
||||||
console.warn('Repository not detected in package.json. Add repository section.');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// useful for creating README later.
|
|
||||||
repository = parsedPackageJSON.repository.url;
|
|
||||||
}
|
|
||||||
|
|
||||||
await updateDeps(parsedPackageJSON, 'devDependencies', {
|
await updateDeps(parsedPackageJSON, 'devDependencies', {
|
||||||
'eslint': '^7.32.0',
|
'eslint': '^7.32.0',
|
||||||
'eslint-config-etherpad': '^2.0.2',
|
'eslint-config-etherpad': '^2.0.2',
|
||||||
|
@ -220,15 +209,7 @@ if (autoPush) {
|
||||||
let readme =
|
let readme =
|
||||||
await fsp.readFile('src/bin/plugins/lib/README.md', {encoding: 'utf8', flag: 'r'});
|
await fsp.readFile('src/bin/plugins/lib/README.md', {encoding: 'utf8', flag: 'r'});
|
||||||
readme = readme.replace(/\[plugin_name\]/g, pluginName);
|
readme = readme.replace(/\[plugin_name\]/g, pluginName);
|
||||||
if (repository) {
|
await fsp.writeFile(`${pluginPath}/README.md`, readme);
|
||||||
const org = repository.split('/')[3];
|
|
||||||
const name = repository.split('/')[4];
|
|
||||||
readme = readme.replace(/\[org_name\]/g, org);
|
|
||||||
readme = readme.replace(/\[repo_url\]/g, name);
|
|
||||||
await fsp.writeFile(`${pluginPath}/README.md`, readme);
|
|
||||||
} else {
|
|
||||||
console.warn('Unable to find repository in package.json, aborting.');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
[](https://travis-ci.com/github/[org_name]/[repo_url])
|
|
||||||
|
|
||||||
# My awesome plugin README example
|
# My awesome plugin README example
|
||||||
Explain what your plugin does and who it's useful for.
|
Explain what your plugin does and who it's useful for.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue