0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-26 12:49:49 +00:00
renovatebot_renovate/app/index.js
Rhys Arkins 75c53563e8 Support selective templates
Closes #38

commit 1a42979d31fa00532e2fddd2f2ee51d10ba03a35
Author: Rhys Arkins <rhys@keylocation.sg>
Date:   Fri Jan 13 19:42:07 2017 +0100

    Move cascaded config to parser

commit 687ed047e662be3b014d76504e4e2f2e812fc06d
Author: Rhys Arkins <rhys@keylocation.sg>
Date:   Fri Jan 13 19:38:50 2017 +0100

    Fill in templates

commit c648564fd24cd65fa26905af68e69961cf2db297
Author: Rhys Arkins <rhys@keylocation.sg>
Date:   Fri Jan 13 19:38:43 2017 +0100

    Refactor config parser
2017-01-13 19:44:06 +01:00

26 lines
771 B
JavaScript

#!/usr/bin/env node
// Initialize config
const configParser = require('./config/parser');
// Require main source
const renovate = require('./renovate');
// Get global config
const config = configParser.getGlobalConfig();
// Initialize our promise chain
let p = Promise.resolve();
// Queue up each repo/package combination
config.repositories.forEach((repo) => {
repo.packageFiles.forEach((packageFile) => {
const cascadedConfig = configParser.getCascadedConfig(repo, packageFile);
p = p.then(() => renovate(repo.repository, packageFile.fileName, cascadedConfig));
});
});
p.then(() => { // eslint-disable-line promise/always-return
config.logger.info('Renovate finished');
})
.catch((error) => {
config.logger.error(`Unexpected error: ${error}`);
});