Skip to content

Instantly share code, notes, and snippets.

@simshanith
Last active August 29, 2015 14:06
Show Gist options
  • Save simshanith/58416a2db4e468328b41 to your computer and use it in GitHub Desktop.
Save simshanith/58416a2db4e468328b41 to your computer and use it in GitHub Desktop.
mc-repo-updater
#!/usr/bin/env node
var path = require('path');
var repos = [
'MasterCard_MCCOM',
'MasterCard_MCCOMServices',
"MasterCard_WCM",
"MasterCard_WCMServices",
'aem',
'mc-enterprise-osgi-configs',
//'mc-locator-ws-mock',
'mc-locator-ws-model',
'mccom-osgi-configs'
];
repos.forEach(function(repo) {
var spawn = require('child_process').spawn;
var update = spawn('svn', ['update'], {
cwd: path.join(__dirname, repo),
env: process.env
});
update.stdout.on('data', function(data) {
console.log(repo);
console.log(data.toString());
});
update.stderr.on('data', function(data) {
console.error(repo);
console.error(data.toString());
});
update.on('close', function (code) {
console.log('%s update exited with code %s', repo, code);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment