Skip to content

Commit 353eb66

Browse files
authored
Merge pull request #269 from AppDevNext/FixScreenshotCompare
Fix screenshot compare
2 parents 6f488dd + 195fc22 commit 353eb66

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

screenShotCompare.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/zsh
22

33
diffFiles=./screenshotDiffs
44
mkdir $diffFiles
@@ -30,7 +30,8 @@ case $OS in
3030
esac
3131

3232
echo "=> delete all old comments, starting with Screenshot differs:$emulatorApi"
33-
oldComments=$(curl_gh -X GET https://api.github.com/repos/"$GITHUB_REPOSITORY"/issues/"$PR"/comments | jq '.[] | (.id |tostring) + "|" + (.user.login | test("github-actions") | tostring) + "|" + (.body | test("Screenshot differs:'$emulatorApi'.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|")
33+
34+
oldComments=$(curl_gh -X GET https://api.github.com/repos/"$GITHUB_REPOSITORY"/issues/"$PR"/comments | jq '.[] | (.id |tostring) + "|" + (.body | test("Screenshot differs:'$emulatorApi'.*") | tostring)' | grep "|true" | tr -d "\"" | cut -f1 -d"|")
3435
echo "comments=$comments"
3536
echo "$oldComments" | while read comment; do
3637
echo "delete comment=$comment"
@@ -52,7 +53,7 @@ for f in *.png; do
5253
else
5354
(( COUNTER++ ))
5455

55-
newName="$1-${f}"
56+
newName="${f}"
5657
mv "${f}" "$newName"
5758
echo "==> Uploaded screenshot $newName"
5859
curl -i -F "file=@$newName" https://www.mxtracks.info/github

0 commit comments

Comments
 (0)