Skip to content

Commit

Permalink
Fix the async deploy process.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveworley committed Jul 23, 2021
1 parent 6d05375 commit 089e267
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/commands/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ command.handler = async function(argv) {
yargs.exit(1);
}

for (let i = 0; i < files.length; i++) {
const file = files[i];
await Promise.all(files.map(async (file) => {
let filepath = path.relative(p, file);
filepath = normalizePaths(filepath);

Expand All @@ -82,20 +81,20 @@ command.handler = async function(argv) {
const md5 = md5File.sync(file);
if (md5 == revision.md5) {
console.log(chalk.blue(`Published version is up-to-date (${filepath})`));
continue;
return;
}
}
try {
await quant.send(file, filepath, true, argv.attachments);
} catch (err) {
console.log(chalk.yellow(err.message + ` (${filepath})`));
continue;
return;
}
console.log(chalk.bold.green('✅') + ` ${filepath}`);
}
}));

if (argv['skip-unpublish']) {
console.log(chalk.yellow('[skip]: Skipping automatic unpublish'));
console.log(chalk.yellow(' -> Skipping the automatic unpublish process'));
yargs.exit(0);
}

Expand Down

0 comments on commit 089e267

Please sign in to comment.