0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-12 14:19:01 +00:00
renovatebot_renovate/renovate.js
2017-01-11 14:33:32 +01:00

22 lines
608 B
JavaScript

// Initialize config
const config = require('./src/config/parser')();
// Require main source
const renovate = require('./src')(config);
// Expose logger
const logger = config.logger;
// Initialize our promise chain
let p = Promise.resolve();
// Queue up each repo/package combination
config.repositories.forEach((repo) => {
repo.packageFiles.forEach((packageFile) => {
p = p.then(() => renovate(repo.name, packageFile));
});
});
p.then(() => { // eslint-disable-line promise/always-return
logger.info('Renovate finished');
})
.catch((error) => {
logger.error(`Unexpected error: ${error}`);
});