mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
Merge branch 'feat/shadps4' of https://github.com/RetroDECK/RetroDECK into feat/okonomiyaki
This commit is contained in:
commit
7ea2f977e0
|
@ -24,7 +24,9 @@ hash^RETRODECKMELONDSLATEST^https://github.com/RetroDECK/net.kuribo64.melonDS/re
|
|||
hash^RETRODECKSOLARUSLATEST^https://github.com/RetroDECK/org.solarus_games.solarus.Launcher/releases/latest/download/RetroDECK-solarus-Artifact.tar.gz
|
||||
hash^RETRODECKGZDOOMLATEST^https://github.com/RetroDECK/org.zdoom.GZDoom/releases/latest/download/RetroDECK-gzdoom-Artifact.tar.gz
|
||||
hash^RETRODECKMAMELATEST^https://github.com/RetroDECK/MAME/releases/latest/download/RetroDECK-MAME-Artifact.tar.gz
|
||||
hash^RETRODECKSHADPS4LATESTSTABLE^https://github.com/shadps4-emu/shadPS4/releases/download/Pre-release-shadPS4-2024-09-24-1620eea/shadps4-linux-qt-2024-09-24-1620eea.zip
|
||||
|
||||
latestghrelease^SHADPS4LATESTGHREL^https://api.github.com/repos/shadps4-emu/shadPS4/releases/latest^shadps4-linux-qt-.*\.zip
|
||||
latestghreleasesha^SHADPS4LATESTSHA^https://api.github.com/repos/shadps4-emu/shadPS4/releases/latest^shadps4-linux-qt-.*\.zip
|
||||
|
||||
#This will replace RETRODECKSHADPS4LATESTURL with the URL of the latest artifact and RETRODECKSHADPS4LATESTSHA with its SHA256 hash.
|
||||
#latestghaartifact^RETRODECKSHADPS4LATESTURL^RETRODECKSHADPS4LATESTSHA^https://github.com/shadps4-emu/shadPS4/actions/workflows/linux-qt.yml^shadps4-linux-qt
|
||||
|
|
|
@ -106,18 +106,23 @@ handle_latestghtag() {
|
|||
|
||||
handle_latestghrelease() {
|
||||
local placeholder="$1"
|
||||
local url="$2"
|
||||
local suffix="$3"
|
||||
echo "Fetching release data from: $url"
|
||||
local release_data=$(curl -s "$url")
|
||||
local api_url="$2"
|
||||
local pattern="$3"
|
||||
echo "Fetching release data from: $api_url"
|
||||
|
||||
# Fetch the release data from GitHub API
|
||||
local release_data=$(curl -s "$api_url")
|
||||
echo "Release data fetched."
|
||||
local ghreleaseurl=$(echo "$release_data" | jq -r ".assets[] | select(.name | endswith(\"$suffix\")).browser_download_url")
|
||||
|
||||
# Find the matching asset using the pattern
|
||||
local ghreleaseurl=$(echo "$release_data" | jq -r ".assets[] | select(.name | test(\"$pattern\")).browser_download_url")
|
||||
|
||||
if [[ -z "$ghreleaseurl" ]]; then
|
||||
echo "Error: No asset found with suffix $suffix"
|
||||
echo "Error: No asset found matching pattern $pattern"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download the file and compute its hash
|
||||
local ghreleasehash=$(curl -sL "$ghreleaseurl" | sha256sum | cut -d ' ' -f1)
|
||||
|
||||
echo "Replacing placeholder $placeholder with URL $ghreleaseurl and hash $ghreleasehash"
|
||||
|
@ -127,18 +132,24 @@ handle_latestghrelease() {
|
|||
|
||||
handle_latestghreleasesha() {
|
||||
local placeholder="$1"
|
||||
local url="$2"
|
||||
local suffix="$3"
|
||||
echo "Fetching release data from: $url"
|
||||
local release_data=$(curl -s "$url")
|
||||
local api_url="$2"
|
||||
local pattern="$3"
|
||||
echo "Fetching release data from: $api_url"
|
||||
|
||||
# Fetch the release data from GitHub API
|
||||
local release_data=$(curl -s "$api_url")
|
||||
echo "Release data fetched."
|
||||
local ghreleaseurl=$(echo "$release_data" | jq -r ".assets[] | select(.name | endswith(\"$suffix\")).browser_download_url")
|
||||
|
||||
# Find the matching asset using the pattern
|
||||
local ghreleaseurl=$(echo "$release_data" | jq -r ".assets[] | select(.name | test(\"$pattern\")).browser_download_url")
|
||||
|
||||
if [[ -z "$ghreleaseurl" ]]; then
|
||||
echo "Error: No asset found with suffix $suffix"
|
||||
echo "Error: No asset found matching pattern $pattern"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Download the file and compute its hash
|
||||
echo "Downloading asset to compute hash: $ghreleaseurl"
|
||||
local ghreleasehash=$(curl -sL "$ghreleaseurl" | sha256sum | cut -d ' ' -f1)
|
||||
|
||||
echo "Replacing placeholder $placeholder with hash $ghreleasehash"
|
||||
|
|
|
@ -616,9 +616,8 @@ modules:
|
|||
- cp -r squashfs-root/usr/* "${FLATPAK_DEST}/"
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://github.com/shadps4-emu/shadPS4/releases/download/Pre-release-shadPS4-2024-09-24-1620eea/shadps4-linux-qt-2024-09-24-1620eea.zip
|
||||
sha256: RETRODECKSHADPS4LATESTSTABLE
|
||||
|
||||
url: SHADPS4LATESTGHREL
|
||||
sha256: SHADPS4LATESTSHA
|
||||
# PortMaster
|
||||
|
||||
- name: PortMaster
|
||||
|
|
Loading…
Reference in a new issue