uploadReport.sh 560 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. URL=https://nextcloud.kaminsky.me/remote.php/webdav/integrationTests
  3. ID=$3
  4. USER=$1
  5. PASS=$2
  6. TYPE=$4
  7. if [ $TYPE = "IT" ]; then
  8. cd build/reports/androidTests/connected/flavors/GPLAY
  9. else
  10. cd build/reports/tests/testGplayDebugUnitTest
  11. fi
  12. find . -type d -exec curl -u $USER:$PASS -X MKCOL $URL/$ID/$(echo {} | sed s#\./##) \;
  13. find . -type f -exec curl -u $USER:$PASS -X PUT $URL/$ID/$(echo {} | sed s#\./##) --upload-file {} \;
  14. echo "Uploaded failing tests to https://nextcloud.kaminsky.me/index.php/s/XqY52jBr9ZYfDiz -> $ID"
  15. exit 1