uploadReport.sh 562 B

12345678910111213141516171819
  1. #!/usr/bin/env bash
  2. URL=https://nextcloud.kaminsky.me/remote.php/webdav/android-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://www.kaminsky.me/nc-dev/android-integrationTests/$ID"
  15. exit 1