Update publish function
This commit is contained in:
parent
11a1cc2ff5
commit
2a3f015f07
@ -63,12 +63,18 @@ function prepare() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function publish() {
|
async function publish() {
|
||||||
// TODO apply queue system so it doesn't publish everything at once
|
// TODO apply queue system to process them concurrently
|
||||||
PACKAGES.forEach((pkg: string) => {
|
for (let pkg of PACKAGES) {
|
||||||
console.log('Going to run the following command: ', `npm publish ${ pkg } ${ FLAGS }`);
|
// console.log('Going to run the following command: ', `npm publish ${ pkg } ${ FLAGS }`);
|
||||||
// exec(`npm publish ${ pkg } ${ FLAGS }`);
|
await new Promise<any>((resolve, reject) => {
|
||||||
|
exec(`npm publish ${ pkg } ${ FLAGS }`, (err, stdout, stderr) => {
|
||||||
|
if (err) reject(err);
|
||||||
|
if (stderr) reject(stderr);
|
||||||
|
if (stdout) resolve(stdout);
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare();
|
prepare();
|
||||||
|
Loading…
Reference in New Issue
Block a user