deploy.sh 569 B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. shopt -s nullglob
  3. for file in 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/${PREFIX}/$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=$(git branch --show-current)" \
  13. --data "shasum=$shasum" \
  14. -L -s https://download.supertux.org/submit.php
  15. done