package.sh 642 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. shopt -s nullglob
  3. if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$PACKAGE" = "ON" ]; then
  4. sudo chmod -R +w /usr/local/Cellar
  5. cpack -G Bundle;
  6. fi
  7. if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$PACKAGE" = "ON" ]; then
  8. cpack --config CPackSourceConfig.cmake -G TGZ;
  9. ../.travis/build_appimage.sh
  10. #extract built appimages for uploading
  11. mv ~/out/* .
  12. fi
  13. mkdir s3-upload
  14. mv SuperTux* s3-upload/
  15. if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
  16. for file in s3-upload/SuperTux*; do
  17. echo "Uploading $file";
  18. url=$(curl --upload-file "$file" "https://transfer.sh/$file")
  19. echo $url
  20. done
  21. fi