checkPlugin: Merge the `autoupdate` option into `autofix`
parent
039c50de80
commit
481fa047e4
|
@ -26,8 +26,7 @@ console.log(`Checking the plugin: ${pluginName}`);
|
||||||
|
|
||||||
const optArgs = process.argv.slice(3);
|
const optArgs = process.argv.slice(3);
|
||||||
const autoCommit = optArgs.indexOf('autocommit') !== -1;
|
const autoCommit = optArgs.indexOf('autocommit') !== -1;
|
||||||
const autoUpdate = autoCommit || optArgs.indexOf('autoupdate') !== -1;
|
const autoFix = autoCommit || optArgs.indexOf('autofix') !== -1;
|
||||||
const autoFix = autoUpdate || optArgs.indexOf('autofix') !== -1;
|
|
||||||
|
|
||||||
const execSync = (cmd, opts = {}) => (childProcess.execSync(cmd, {
|
const execSync = (cmd, opts = {}) => (childProcess.execSync(cmd, {
|
||||||
cwd: `${pluginPath}/`,
|
cwd: `${pluginPath}/`,
|
||||||
|
@ -344,7 +343,7 @@ fs.readdir(pluginPath, (err, rootFiles) => {
|
||||||
console.log('Travis file created, please sign into travis and enable this repository');
|
console.log('Travis file created, please sign into travis and enable this repository');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (autoFix && autoUpdate) {
|
if (autoFix) {
|
||||||
// checks the file versioning of .travis and updates it to the latest.
|
// checks the file versioning of .travis and updates it to the latest.
|
||||||
const existingConfig = fs.readFileSync(`${pluginPath}/.travis.yml`, {encoding: 'utf8', flag: 'r'});
|
const existingConfig = fs.readFileSync(`${pluginPath}/.travis.yml`, {encoding: 'utf8', flag: 'r'});
|
||||||
const existingConfigLocation = existingConfig.indexOf('##ETHERPAD_TRAVIS_V=');
|
const existingConfigLocation = existingConfig.indexOf('##ETHERPAD_TRAVIS_V=');
|
||||||
|
|
Loading…
Reference in New Issue