File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
.github/workflows/actions/update-reference-screenshots Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,21 @@ runs:
34
34
run : |
35
35
git config user.name ionitron
36
36
git config user.email [email protected]
37
- git add src/\*.png --force
37
+
38
+ # This adds an empty entry for new
39
+ # screenshot files so we can track them with
40
+ # git diff
41
+ git add src/\*.png --force -N
38
42
39
43
if git diff --exit-code; then
40
44
echo -e "\033[1;31m⚠️ Error: No new screenshots generated ⚠️\033[0m"
41
45
echo -e "\033[1;31mThis means that there were zero visual diffs when running screenshot tests.\033[0m"
42
46
echo -e "\033[1;31mMake sure you have pushed any code changes that would result in visual diffs.\033[0m"
43
47
exit 1
44
48
else
49
+ # This actually adds the contents
50
+ # of the screenshots (including new ones)
51
+ git add src/\*.png --force
45
52
git commit -m "chore(): add updated snapshots"
46
53
git push
47
54
fi
You can’t perform that action at this time.
0 commit comments