deploy.sh 607 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. shopt -s nullglob
  3. for file in s3-upload/SuperTux*; do
  4. file_base=$(basename $file)
  5. echo "Uploading $file_base";
  6. url="https://supertux-ci-downloads.s3-us-west-2.amazonaws.com/${TRAVIS_COMMIT}/travis/${TRAVIS_OS_NAME}/${TRAVIS_JOB_ID}/$file_base"
  7. size=$(($(wc -c < "$file")))
  8. shasum=$(shasum -a 256 "$file" | cut -d " " -f 1)
  9. curl --data "apikey=$DOWNLOAD_APIKEY" \
  10. --data "url=$url" \
  11. --data "size=$size" \
  12. --data "branch=$TRAVIS_BRANCH" \
  13. --data "shasum=$shasum" \
  14. -L -s https://download.supertux.org/submit.php
  15. done