Skip to content

Commit 86a5b0a

Browse files
authored
Update check-backwards-compatability.sh
1 parent 717a899 commit 86a5b0a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/check-backwards-compatability.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ for tag in $tags; do
2727

2828
set +e # do our own error handling for a bit
2929
echo "Checking backward compatibility of semgrep_output_v1.atd against past version $tag"
30-
git difftool --trust-exit-code -x 'atddiff --no-locations --backward' -y "$tag" "origin/main" semgrep_output_v1.atd | tee before.txt
30+
git difftool --trust-exit-code -x 'atddiff --no-locations --backward' -y "$tag" "origin/main" semgrep_output_v1.atd > before.txt
3131
ret=$?
3232
if [ "$ret" -ge 1 ] && [ "$ret" -le 2 ]; then
3333
echo "ERROR: atddiff had an error: $?"
34+
cat before.txt
3435
exit 1
3536
fi
36-
git difftool --trust-exit-code -x 'atddiff --no-locations --backward' -y "$tag" "HEAD" semgrep_output_v1.atd | tee after.txt
37+
git difftool --trust-exit-code -x 'atddiff --no-locations --backward' -y "$tag" "HEAD" semgrep_output_v1.atd > after.txt
3738
ret=$?
3839
if [ "$ret" -ge 1 ] && [ "$ret" -le 2 ]; then
3940
echo "ERROR: atddiff had an error: $?"
41+
cat after.txt
4042
exit 1
4143
fi
4244

43-
# neccesary because filenames have temp paths and line numbers can change without causing issues
44-
#expr='s|File "/.*/\(.*.atd\)", line .*$|File "\1", line <removed for diff>|g'
4545
diff -u <(cat before.txt) <(cat after.txt)
4646
if [ "$?" -ne 0 ]; then
4747
echo "ERROR: semgrep_output_v1.atd is not backward compatible with $tag"

0 commit comments

Comments
 (0)