Skip to content

Commit f725009

Browse files
authored
Merge pull request #242 from AppDevNext/UseRecentMxTracksDiff
Use recent mx tracks diff
2 parents 458ab04 + eea24e1 commit f725009

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

screenShotCompare.sh

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

33
diffFiles=./screenshotDiffs
44
mkdir $diffFiles
@@ -13,8 +13,8 @@ PR=$(echo "$GITHUB_REF_NAME" | sed "s/\// /" | awk '{print $1}')
1313
echo pr=$PR
1414
brew install jq
1515

16-
# delete all old comments, starting with "Screenshot differs:"
17-
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:.*") | tostring)' | grep "true|true" | tr -d "\"" | cut -f1 -d"|")
16+
echo "delete all old comments, starting with Screenshot differs:$emulatorApi"
17+
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"|")
1818
echo "comments=$comments"
1919
echo "$oldComments" | while read comment; do
2020
echo "delete comment=$comment"
@@ -45,7 +45,7 @@ for f in *.png; do
4545
done
4646

4747
if [ ! "$body" == "" ]; then
48-
curl_gh -X POST https://api.github.com/repos/"$GITHUB_REPOSITORY"/issues/$PR/comments -d "{ \"body\" : \"Screenshot differs: $COUNTER <br/><br/> $body \" }"
48+
curl_gh -X POST https://api.github.com/repos/"$GITHUB_REPOSITORY"/issues/$PR/comments -d "{ \"body\" : \"Screenshot differs:$emulatorApi $COUNTER <br/><br/> $body \" }"
4949
fi
5050

5151
popd 1>/dev/null

0 commit comments

Comments
 (0)