fail on binary diff r=cf b=408157

This commit is contained in:
rhelmer%mozilla.com 2007-12-26 20:37:57 +00:00
Родитель f63eb3c160
Коммит e3b1b19ef4
2 изменённых файлов: 24 добавлений и 7 удалений

Просмотреть файл

@ -57,9 +57,21 @@ check_updates () {
return 1
fi
diff -r \
-x installed-chrome.txt \
-x removed-files \
source/$platform_dirname target/$platform_dirname
return $?
diff -r source/$platform_dirname target/$platform_dirname > results.diff
err=$?
cat results.diff
grep '^Binary files' results.diff > /dev/null
if [ $? == 0 ]
then
echo "FAIL: binary files found in diff"
return 1
elif [ -s results.diff ]
then
echo "WARN: non-binary files found in diff"
return 2
else
# unknown error
echo "FAIL: Unknown error from diff exit code: $err"
return 3
fi
}

Просмотреть файл

@ -130,9 +130,14 @@ do
target_file=`basename "$to_path"`
check_updates "$platform" "downloads/$source_file" "downloads/$target_file" $locale
err=$?
if [ "$err" != "0" ]; then
echo "WARN: check_update returned non-zero exit code for $platform downloads/$source_file vs. downloads/$target_file: $err"
if [ "$err" == "0" ]; then
continue
elif [ "$err" == "1" ]; then
echo "FAIL: check_updates returned failure for $platform downloads/$source_file vs. downloads/$target_file: $err"
elif [ "$err" == "2" ]; then
echo "WARN: check_updates returned warning for $platform downloads/$source_file vs. downloads/$target_file: $err"
else
echo "FAIL: check_updates returned unknown error for $platform downloads/$source_file vs. downloads/$target_file: $err"
fi
fi
done