diff --git a/packages/code-infra/src/cli/cmdArgosPush.mjs b/packages/code-infra/src/cli/cmdArgosPush.mjs index b7f962f79..1f69e13d8 100644 --- a/packages/code-infra/src/cli/cmdArgosPush.mjs +++ b/packages/code-infra/src/cli/cmdArgosPush.mjs @@ -63,8 +63,11 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({ const screenshots = await globby(`${folder}/**/*`, { onlyFiles: true, }); + const threshold = process.env.ARGOS_THRESHOLD ? parseFloat(process.env.ARGOS_THRESHOLD) : 0.5; - console.log(`Found ${screenshots.length} screenshots.`); + console.log( + `Found ${screenshots.length} screenshots. Uploading with threshold ${threshold}.`, + ); if (verbose) { console.log('Screenshots found:'); screenshots.forEach((screenshot) => { @@ -99,14 +102,22 @@ export default /** @type {import('yargs').CommandModule<{}, Args>} */ ({ commit: circleSha1, branch: circleBranch, token: argosToken, + threshold, parallel: { total: batches.length, nonce: circleBuildNum, }, }); + if (verbose) { + console.log('Screenshots uploaded:'); + for (const screenshot of result.screenshots) { + console.log(`- ${screenshot.name}. Threshold: ${screenshot.threshold}.`); + } + } + console.log( - `Batch of ${batches[i].length} screenshots uploaded. Build URL: ${result.build.url}`, + `Batch of ${batches[i].length} screenshots uploaded. Threshold: ${threshold}. Build URL: ${result.build.url}`, ); } } finally {