diff --git a/automation_tools/automation_task_list.cfg b/automation_tools/automation_task_list.cfg index 5ba6b79c..fdd0ed1c 100644 --- a/automation_tools/automation_task_list.cfg +++ b/automation_tools/automation_task_list.cfg @@ -26,7 +26,7 @@ hash^RETRODECKGZDOOMLATEST^https://github.com/RetroDECK/org.zdoom.GZDoom/release hash^RETRODECKMAMELATEST^https://github.com/RetroDECK/MAME/releases/latest/download/RetroDECK-MAME-Artifact.tar.gz latestghrelease^SHADPS4LATESTGHREL^https://github.com/shadps4-emu/shadPS4/releases/latest/download/shadps4-linux-qt-*.zip -latestghreleasesha^SHADPS4LATESTSHA^https://github.com/shadps4-emu/shadPS4/releases/latest/download/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 diff --git a/automation_tools/pre_build_automation.sh b/automation_tools/pre_build_automation.sh index d0210ad6..d4151e16 100755 --- a/automation_tools/pre_build_automation.sh +++ b/automation_tools/pre_build_automation.sh @@ -129,10 +129,12 @@ handle_latestghrelease() { handle_latestghreleasesha() { local placeholder="$1" - local url="$2" + local api_url="$2" local pattern="$3" - echo "Fetching release data from: $url" - local release_data=$(curl -s "$url") + 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." # Find the matching asset using the pattern @@ -144,6 +146,7 @@ handle_latestghreleasesha() { 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"