Commit 3462d9f2 authored by Ivo Fokkema's avatar Ivo Fokkema

Fixed screenshot uploader properly, now.

parent ff805085
......@@ -9,11 +9,13 @@ for file in `ls -1 -t -r ${GLOB}/test_results/error_screenshots/ | grep -F .png`
# Upload to transfer.sh, this command will output the URL on which the
# uploaded file can be reached.
RETURN=`curl --upload-file "${file}" https://transfer.sh`;
if [[ ! $RETURN == "Could not save metadata" ]];
RETURN=`curl -s -H "Max-Days: 2" --upload-file "${GLOB}/test_results/error_screenshots/${file}" https://transfer.sh`;
echo $RETURN;
if [[ $RETURN == "Could not save metadata" ]];
then
# Transfer.sh service often fails.
mutt -s "Travis failure" -a "${file}" -- I.F.A.C.Fokkema@LUMC.nl < <(echo "Travis run failed. Screenshot attached.")
echo "Transfer.sh failed, emailing file...";
mutt -s "Travis failure" -a "${GLOB}/test_results/error_screenshots/${file}" -- I.F.A.C.Fokkema@LUMC.nl < <(echo "Travis run failed. Screenshot attached.")
fi
rm -f "${file}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment