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
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,21 @@ runs:
run: |
git config user.name ionitron
git config user.email hi@ionicframework.com
git add src/\*.png --force

# This adds an empty entry for new
# screenshot files so we can track them with
# git diff
git add src/\*.png --force -N

if git diff --exit-code; then
echo -e "\033[1;31m⚠️ Error: No new screenshots generated ⚠️\033[0m"
echo -e "\033[1;31mThis means that there were zero visual diffs when running screenshot tests.\033[0m"
echo -e "\033[1;31mMake sure you have pushed any code changes that would result in visual diffs.\033[0m"
exit 1
else
# This actually adds the contents
# of the screenshots (including new ones)
git add src/\*.png --force
git commit -m "chore(): add updated snapshots"
git push
fi
Expand Down