CI: Skip raw diffs
Turns out the `-compose src` turns off the "shadow" of the image that
we're manually adding in on the next line:
https://www.imagemagick.org/Usage/compare/
Also, apparently `-list metric` will list every diff metric, that's
cool:
http://www.imagemagick.org/script/command-line-options.php?#metric
diff --git a/circle.yml b/circle.yml
index 5ba036c..8a0b308 100644
--- a/circle.yml
+++ b/circle.yml
@@ -197,7 +197,6 @@
| grep '\.png$' \
| grep -v '/pieces/' \
| grep -v '/baseline/' \
- | grep -v '/raw_diffs/' \
| sed "s:\$CIRCLE_ARTIFACTS/imgs/:-o $CIRCLE_ARTIFACTS/imgs/baseline/:")"
echo 'Baseline image URLs and files:'
echo
@@ -209,14 +208,12 @@
# Generate image diffs.
- |-
cd $CIRCLE_ARTIFACTS/imgs/
- mkdir raw_diffs/
for file in $(ls *.png); do
# if evergreen browser, browser version of previous screenshot may not match,
# so replace previous browser version with glob
baseline=baseline/"$(sh -c "ls $(echo $file | sed 's/[^_]*_(evergreen)/*/')")"
- echo "Metric diff for $file:"
- compare -metric AE -compose src $baseline $file raw_diffs/$file
- composite -alpha on raw_diffs/$file $prev ${file/%.png/_DIFF.png}
+ echo "Diff metrics for $file:"
+ compare -list metric $baseline $file ${file/%.png/_DIFF.png}
done
post:
- killall --wait sc; true # wait for Sauce Connect to close the tunnel; ignore errors since it's just cleanup