package.sh 879 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. shopt -s nullglob
  3. if ([ "$OS_NAME" = "macos-10.15" ] || [ "$OS_NAME" = "macos-11" ]) && [ "$PACKAGE" = "ON" ]; then
  4. sudo chmod -R +w /usr/local/Cellar
  5. cpack -G Bundle;
  6. fi
  7. # make only one source package
  8. if [ "$OS_NAME" = "ubuntu-latest" ] && [ "$COMPILER_NAME" = "gcc" ] && [ "$BUILD_NAME" = "Release" ] && [ "$ARCH" = "64" ] && [ "$PACKAGE" = "ON" ]; then
  9. cpack --config CPackSourceConfig.cmake -G TGZ;
  10. fi
  11. if [ "$OS_NAME" = "ubuntu-latest" ] && [ "$PACKAGE" = "ON" ]; then
  12. ../.ci_scripts/build_appimage.sh
  13. # extract built appimages for uploading
  14. mv ~/out/* .
  15. # CI expects all artifacts to start with "SuperTux-", AppImage generates "SuperTux_v2-...."
  16. for filename in SuperTux_2-*.AppImage; do
  17. [ -f "$filename" ] || continue
  18. mv "$filename" "${filename//_2/}"
  19. done
  20. fi
  21. mkdir upload
  22. mv SuperTux* upload/