mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 07:25: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^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^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^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.
|
#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
|
#latestghaartifact^RETRODECKSHADPS4LATESTURL^RETRODECKSHADPS4LATESTSHA^https://github.com/shadps4-emu/shadPS4/actions/workflows/linux-qt.yml^shadps4-linux-qt
|
||||||
|
|
|
@ -106,20 +106,25 @@ handle_latestghtag() {
|
||||||
|
|
||||||
handle_latestghrelease() {
|
handle_latestghrelease() {
|
||||||
local placeholder="$1"
|
local placeholder="$1"
|
||||||
local url="$2"
|
local api_url="$2"
|
||||||
local suffix="$3"
|
local pattern="$3"
|
||||||
echo "Fetching release data from: $url"
|
echo "Fetching release data from: $api_url"
|
||||||
local release_data=$(curl -s "$url")
|
|
||||||
|
# Fetch the release data from GitHub API
|
||||||
|
local release_data=$(curl -s "$api_url")
|
||||||
echo "Release data fetched."
|
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
|
if [[ -z "$ghreleaseurl" ]]; then
|
||||||
echo "Error: No asset found with suffix $suffix"
|
echo "Error: No asset found matching pattern $pattern"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Download the file and compute its hash
|
||||||
local ghreleasehash=$(curl -sL "$ghreleaseurl" | sha256sum | cut -d ' ' -f1)
|
local ghreleasehash=$(curl -sL "$ghreleaseurl" | sha256sum | cut -d ' ' -f1)
|
||||||
|
|
||||||
echo "Replacing placeholder $placeholder with URL $ghreleaseurl and hash $ghreleasehash"
|
echo "Replacing placeholder $placeholder with URL $ghreleaseurl and hash $ghreleasehash"
|
||||||
/bin/sed -i 's^'"$placeholder"'^'"$ghreleaseurl"'^g' "$rd_manifest"
|
/bin/sed -i 's^'"$placeholder"'^'"$ghreleaseurl"'^g' "$rd_manifest"
|
||||||
/bin/sed -i 's^'"HASHFOR$placeholder"'^'"$ghreleasehash"'^g' "$rd_manifest"
|
/bin/sed -i 's^'"HASHFOR$placeholder"'^'"$ghreleasehash"'^g' "$rd_manifest"
|
||||||
|
@ -127,20 +132,26 @@ handle_latestghrelease() {
|
||||||
|
|
||||||
handle_latestghreleasesha() {
|
handle_latestghreleasesha() {
|
||||||
local placeholder="$1"
|
local placeholder="$1"
|
||||||
local url="$2"
|
local api_url="$2"
|
||||||
local suffix="$3"
|
local pattern="$3"
|
||||||
echo "Fetching release data from: $url"
|
echo "Fetching release data from: $api_url"
|
||||||
local release_data=$(curl -s "$url")
|
|
||||||
echo "Release data fetched."
|
|
||||||
local ghreleaseurl=$(echo "$release_data" | jq -r ".assets[] | select(.name | endswith(\"$suffix\")).browser_download_url")
|
|
||||||
|
|
||||||
|
# Fetch the release data from GitHub API
|
||||||
|
local release_data=$(curl -s "$api_url")
|
||||||
|
echo "Release data fetched."
|
||||||
|
|
||||||
|
# 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
|
if [[ -z "$ghreleaseurl" ]]; then
|
||||||
echo "Error: No asset found with suffix $suffix"
|
echo "Error: No asset found matching pattern $pattern"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Download the file and compute its hash
|
||||||
|
echo "Downloading asset to compute hash: $ghreleaseurl"
|
||||||
local ghreleasehash=$(curl -sL "$ghreleaseurl" | sha256sum | cut -d ' ' -f1)
|
local ghreleasehash=$(curl -sL "$ghreleaseurl" | sha256sum | cut -d ' ' -f1)
|
||||||
|
|
||||||
echo "Replacing placeholder $placeholder with hash $ghreleasehash"
|
echo "Replacing placeholder $placeholder with hash $ghreleasehash"
|
||||||
/bin/sed -i 's^'"$placeholder"'^'"$ghreleasehash"'^g' "$rd_manifest"
|
/bin/sed -i 's^'"$placeholder"'^'"$ghreleasehash"'^g' "$rd_manifest"
|
||||||
}
|
}
|
||||||
|
|
|
@ -616,9 +616,8 @@ modules:
|
||||||
- cp -r squashfs-root/usr/* "${FLATPAK_DEST}/"
|
- cp -r squashfs-root/usr/* "${FLATPAK_DEST}/"
|
||||||
sources:
|
sources:
|
||||||
- type: archive
|
- 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
|
url: SHADPS4LATESTGHREL
|
||||||
sha256: RETRODECKSHADPS4LATESTSTABLE
|
sha256: SHADPS4LATESTSHA
|
||||||
|
|
||||||
# PortMaster
|
# PortMaster
|
||||||
|
|
||||||
- name: PortMaster
|
- name: PortMaster
|
||||||
|
|
Loading…
Reference in a new issue