Using console.time instead of log for output

This commit is contained in:
Ducko 2021-01-23 10:34:45 +00:00
parent 3bdae9f2d6
commit 5bf718d9ef
1 changed files with 9 additions and 8 deletions

View File

@ -33,7 +33,8 @@ const parcelOptions = {
let moduleJson = [];
for (const repo of ModuleRepos) {
console.log(repo);
// console.log(repo);
console.time(repo);
const url = `https://github.com/${repo.split('@')[0]}.git`;
const commitHash = repo.split('@')[1];
@ -48,12 +49,6 @@ for (const repo of ModuleRepos) {
const lastHash = await new Promise((res) => exec(`git rev-parse HEAD`, (err, stdout) => res(stdout.trim())));
console.log(lastHash);
if (lastHash !== commitHash) {
console.log('[Warning] Commit hash in modules does not match latest commit in repo');
}
await new Promise((res) => exec(`git checkout ${commitHash}`, res))
const manifest = JSON.parse(readFileSync(`${cloneDir}/goosemodModule.json`));
@ -85,5 +80,11 @@ for (const repo of ModuleRepos) {
authors: manifest.authors
});
console.log();
console.timeEnd(repo);
// console.log(lastHash);
if (lastHash !== commitHash) {
console.log('[Warning] Commit hash in modules does not match latest commit in repo');
}
}