Skip to content

Commit 1f9c70b

Browse files
committed
Merge remote-tracking branch 'origin/main' into sync-feat-74-again
2 parents 2e7d89c + fd5a1ac commit 1f9c70b

File tree

1 file changed

+8
-1
lines changed
  • .github/workflows/actions/update-reference-screenshots

1 file changed

+8
-1
lines changed

.github/workflows/actions/update-reference-screenshots/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,21 @@ runs:
3434
run: |
3535
git config user.name ionitron
3636
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
3842
3943
if git diff --exit-code; then
4044
echo -e "\033[1;31m⚠️ Error: No new screenshots generated ⚠️\033[0m"
4145
echo -e "\033[1;31mThis means that there were zero visual diffs when running screenshot tests.\033[0m"
4246
echo -e "\033[1;31mMake sure you have pushed any code changes that would result in visual diffs.\033[0m"
4347
exit 1
4448
else
49+
# This actually adds the contents
50+
# of the screenshots (including new ones)
51+
git add src/\*.png --force
4552
git commit -m "chore(): add updated snapshots"
4653
git push
4754
fi

0 commit comments

Comments
 (0)