feat(build): add verbose build output, progress logging, and timing for builds/tests

This commit is contained in:
2026-02-06 14:52:16 +00:00
parent 16cd0bbd87
commit 02b267ee10
8 changed files with 115 additions and 49 deletions

View File

@@ -67,23 +67,15 @@ export class TsDockerCache {
const entry = this.data.entries[cleanTag];
if (!entry) {
console.log(`[cache] ${cleanTag}:`);
console.log(`[cache] Content hash: ${contentHash}`);
console.log(`[cache] Stored hash: (none)`);
console.log(`[cache] Hash match: no`);
console.log(`→ Building ${cleanTag}`);
logger.log('info', `[cache] ${cleanTag}: no cached entry, will build`);
return false;
}
const hashMatch = entry.contentHash === contentHash;
console.log(`[cache] ${cleanTag}:`);
console.log(`[cache] Content hash: ${contentHash}`);
console.log(`[cache] Stored hash: ${entry.contentHash}`);
console.log(`[cache] Image ID: ${entry.imageId}`);
console.log(`[cache] Hash match: ${hashMatch ? 'yes' : 'no'}`);
logger.log('info', `[cache] ${cleanTag}: hash ${hashMatch ? 'matches' : 'changed'}`);
if (!hashMatch) {
console.log(`→ Building ${cleanTag}`);
logger.log('info', `[cache] ${cleanTag}: content changed, will build`);
return false;
}
@@ -92,14 +84,13 @@ export class TsDockerCache {
`docker image inspect ${entry.imageId} > /dev/null 2>&1`
);
const available = inspectResult.exitCode === 0;
console.log(`[cache] Available: ${available ? 'yes' : 'no'}`);
if (available) {
console.log(`→ Skipping build for ${cleanTag} (cache hit)`);
logger.log('info', `[cache] ${cleanTag}: cache hit, skipping build`);
return true;
}
console.log(`→ Building ${cleanTag} (image no longer available)`);
logger.log('info', `[cache] ${cleanTag}: image no longer available, will build`);
return false;
}