mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-22 05:55:38 +00:00
SHADPS4: added (missing ES-DE part)
This commit is contained in:
parent
92990c6224
commit
73942b7f33
|
@ -24,3 +24,6 @@ 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
|
||||
|
||||
#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
|
||||
|
|
|
@ -188,8 +188,44 @@ handle_thisrepo() {
|
|||
/bin/sed -i 's^'"$placeholder"'^'"$current_repo_url"'^g' "$rd_manifest"
|
||||
}
|
||||
|
||||
# New function to handle the latest artifact from GitHub Actions
|
||||
handle_latestghaartifact() {
|
||||
local placeholder_url="$1"
|
||||
local placeholder_hash="$2"
|
||||
local workflow_url="$3"
|
||||
local artifact_name="$4"
|
||||
|
||||
echo "Fetching workflow runs from: $workflow_url"
|
||||
workflow_runs_url=$(echo "$workflow_url" | sed 's/github.com/api.github.com\/repos/' | sed 's/actions\/workflows\/[^\/]*$/actions\/runs/')
|
||||
|
||||
local runs_data=$(curl -s "$workflow_runs_url")
|
||||
local latest_run_url=$(echo "$runs_data" | jq -r ".workflow_runs[0].artifacts_url")
|
||||
|
||||
if [[ -z "$latest_run_url" ]]; then
|
||||
echo "Error: No workflow runs found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Fetching artifacts from the latest run: $latest_run_url"
|
||||
local artifacts_data=$(curl -s "$latest_run_url")
|
||||
local artifact_url=$(echo "$artifacts_data" | jq -r ".artifacts[] | select(.name == \"$artifact_name\").archive_download_url")
|
||||
|
||||
if [[ -z "$artifact_url" ]]; then
|
||||
echo "Error: No artifact found with name $artifact_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Downloading the artifact to calculate the hash..."
|
||||
local artifact_hash=$(curl -sL "$artifact_url" | sha256sum | cut -d ' ' -f1)
|
||||
|
||||
echo "Replacing placeholder $placeholder_url with artifact URL $artifact_url"
|
||||
echo "Replacing placeholder $placeholder_hash with artifact hash $artifact_hash"
|
||||
/bin/sed -i 's^'"$placeholder_url"'^'"$artifact_url"'^g' "$rd_manifest"
|
||||
/bin/sed -i 's^'"$placeholder_hash"'^'"$artifact_hash"'^g' "$rd_manifest"
|
||||
}
|
||||
|
||||
# Process the task list
|
||||
while IFS="^" read -r action placeholder url branch || [[ -n "$action" ]]; do
|
||||
while IFS="^" read -r action placeholder url branch artifact_name || [[ -n "$action" ]]; do
|
||||
if [[ ! "$action" == "#"* ]] && [[ -n "$action" ]]; then
|
||||
case "$action" in
|
||||
"branch" ) handle_branch "$placeholder" ;;
|
||||
|
@ -203,6 +239,7 @@ while IFS="^" read -r action placeholder url branch || [[ -n "$action" ]]; do
|
|||
"custom_command" ) handle_custom_command "$url" ;;
|
||||
"url" ) handle_url "$placeholder" "$url" ;;
|
||||
"THISREPO" ) handle_thisrepo "$placeholder" ;;
|
||||
"latestghaartifact" ) handle_latestghaartifact "$placeholder" "$branch" "$url" "$artifact_name" ;;
|
||||
esac
|
||||
fi
|
||||
done < "$automation_task_list"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -524,6 +524,22 @@ modules:
|
|||
url: https://github.com/RetroDECK/MAME/releases/latest/download/RetroDECK-MAME-Artifact.tar.gz
|
||||
sha256: RETRODECKMAMELATEST
|
||||
|
||||
# SHADPS4
|
||||
|
||||
- name: shadps4
|
||||
buildsystem: simple
|
||||
build-commands:
|
||||
- unzip shadps4-linux-qt.zip
|
||||
- chmod +x *.AppImage
|
||||
- ./*.AppImage --appimage-extract
|
||||
- mkdir -p "${FLATPAK_DEST}/retrodeck/tmplib" "${FLATPAK_DEST}/retrodeck/tmplib/debug"
|
||||
- mv "squashfs-root/usr/lib/"* "${FLATPAK_DEST}/retrodeck/tmplib"
|
||||
- cp -r squashfs-root/usr/* "${FLATPAK_DEST}/"
|
||||
sources:
|
||||
- type: file
|
||||
url: RETRODECKSHADPS4LATESTURL
|
||||
sha256: RETRODECKSHADPS4LATESTSHA
|
||||
|
||||
# ES-DE
|
||||
|
||||
- name: ES-DE
|
||||
|
|
Loading…
Reference in a new issue