0
0
Fork 0
mirror of https://github.com/renovatebot/renovate.git synced 2025-01-12 22:29:06 +00:00
renovatebot_renovate/app/index.js
Rhys Arkins 3b4a9b319c Enhance config structure for package files (#37)
* Better nest packageFiles

* fix lint
2017-01-13 13:30:13 +01:00

24 lines
645 B
JavaScript

#!/usr/bin/env node
// Initialize config
const config = require('./config/parser')();
// Require main source
const renovate = require('./renovate')(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.repository, packageFile.fileName));
});
});
p.then(() => { // eslint-disable-line promise/always-return
logger.info('Renovate finished');
})
.catch((error) => {
logger.error(`Unexpected error: ${error}`);
});