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 491053d683 Add bin
2017-01-13 10:10:33 +01:00

24 lines
630 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.name, packageFile));
});
});
p.then(() => { // eslint-disable-line promise/always-return
logger.info('Renovate finished');
})
.catch((error) => {
logger.error(`Unexpected error: ${error}`);
});