Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions packages/code-infra/src/cli/cmdArgosPush.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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 {
Expand Down
Loading