upload.sh 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash -ex
  2. # SPDX-FileCopyrightText: 2019 yuzu Emulator Project
  3. # SPDX-License-Identifier: GPL-2.0-or-later
  4. # Modified by JuanCStar on 2024/03/06
  5. . .ci/scripts/common/pre-upload.sh
  6. APPIMAGE_NAME="yuzu-${RELEASE_NAME}-${GITDATE}-${GITREV}.AppImage"
  7. BASE_NAME="yuzu-linux"
  8. REV_NAME="${BASE_NAME}-${GITDATE}-${GITREV}"
  9. ARCHIVE_NAME="${REV_NAME}.tar.xz"
  10. COMPRESSION_FLAGS="-cJvf"
  11. if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
  12. DIR_NAME="${BASE_NAME}-${RELEASE_NAME}"
  13. else
  14. DIR_NAME="${REV_NAME}-${RELEASE_NAME}"
  15. fi
  16. mkdir "$DIR_NAME"
  17. cp build/bin/yuzu-cmd "$DIR_NAME"
  18. if [ "${RELEASE_NAME}" != "early-access" ] && [ "${RELEASE_NAME}" != "mainline" ]; then
  19. cp build/bin/yuzu "$DIR_NAME"
  20. fi
  21. # Build an AppImage
  22. cd build
  23. wget -nc https://github.com/yuzu-emu/ext-linux-bin/raw/main/appimage/appimagetool-x86_64.AppImage
  24. chmod 755 appimagetool-x86_64.AppImage
  25. # if FUSE is not available, then fallback to extract and run
  26. if ! ./appimagetool-x86_64.AppImage --version; then
  27. export APPIMAGE_EXTRACT_AND_RUN=1
  28. fi
  29. # Don't let AppImageLauncher ask to integrate EA
  30. if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
  31. echo "X-AppImage-Integrate=false" >> AppDir/org.suyu_emu.suyu.desktop
  32. fi
  33. if [ "${RELEASE_NAME}" = "mainline" ]; then
  34. # Generate update information if releasing to mainline
  35. ./appimagetool-x86_64.AppImage -u "gh-releases-zsync|yuzu-emu|yuzu-${RELEASE_NAME}|latest|yuzu-*.AppImage.zsync" AppDir "${APPIMAGE_NAME}"
  36. else
  37. ./appimagetool-x86_64.AppImage AppDir "${APPIMAGE_NAME}"
  38. fi
  39. cd ..
  40. # Copy the AppImage and update info to the artifacts directory and avoid compressing it
  41. cp "build/${APPIMAGE_NAME}" "${ARTIFACTS_DIR}/"
  42. if [ -f "build/${APPIMAGE_NAME}.zsync" ]; then
  43. cp "build/${APPIMAGE_NAME}.zsync" "${ARTIFACTS_DIR}/"
  44. fi
  45. # Copy the AppImage to the general release directory and remove git revision info
  46. if [ "${RELEASE_NAME}" = "mainline" ] || [ "${RELEASE_NAME}" = "early-access" ]; then
  47. cp "build/${APPIMAGE_NAME}" "${DIR_NAME}/yuzu-${RELEASE_NAME}.AppImage"
  48. fi
  49. # Copy debug symbols to artifacts
  50. cd build/bin
  51. tar $COMPRESSION_FLAGS "${ARTIFACTS_DIR}/${REV_NAME}-debug.tar.xz" *.debug
  52. cd -
  53. . .ci/scripts/common/post-upload.sh