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