forked from fanruan/demo-tabledata-redis
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
667 B
29 lines
667 B
6 years ago
|
const spawn = require('child_process').spawn;
|
||
|
|
||
|
const repositories = ['fineui', 'fineui-materials'];
|
||
|
|
||
|
update(repositories);
|
||
|
|
||
|
function update(repositories, index = 0) {
|
||
|
if (index === repositories.length) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
const repository = repositories[index];
|
||
|
|
||
|
const ls = spawn(`yarn`, ['upgrade', `${repository}`]);
|
||
|
|
||
|
ls.stdout.on('data', data => {
|
||
|
console.log(data.toString());
|
||
|
});
|
||
|
|
||
|
ls.stderr.on('data', data => {
|
||
|
console.log(data.toString());
|
||
|
});
|
||
|
|
||
|
ls.on('exit', code => {
|
||
|
console.log(`${repository} child process exited with code `, code.toString());
|
||
|
|
||
|
update(repositories, index + 1);
|
||
|
});
|
||
|
}
|