upload.sh 1.7 KB

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