lint-up-wrapper.sh 702 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. #1: GIT_USERNAME
  3. #2: GIT_TOKEN
  4. #3: BRANCH
  5. #4: LOG_USERNAME
  6. #5: LOG_PASSWORD
  7. #6: DRONE_BUILD_NUMBER
  8. ruby scripts/lint/lint-up.rb $1 $2 $3
  9. returnValue=$?
  10. if [ $3 = "master" ]; then
  11. echo "New master at: https://nextcloud.kaminsky.me/index.php/s/tXwtChzyqMj6I8v"
  12. curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/master.html --upload-file build/reports/lint/lint.html
  13. exit 0
  14. elif [ $returnValue -eq 1 ]; then
  15. echo "New results at https://nextcloud.kaminsky.me/index.php/s/tXwtChzyqMj6I8v ->" $6.html
  16. curl -u $4:$5 -X PUT https://nextcloud.kaminsky.me/remote.php/webdav/droneLogs/$6.html --upload-file build/reports/lint/lint.html
  17. exit 1
  18. fi