зеркало из https://github.com/mozilla/pjs.git
fail on binary diff r=cf b=408157
This commit is contained in:
Родитель
f63eb3c160
Коммит
e3b1b19ef4
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче