mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-21 21:45:39 +00:00
PRE_BUILD_AUTOMATION: added wildcard support to latestghrelease + sha -fix2
This commit is contained in:
parent
6930fb281a
commit
39dd36c488
|
@ -25,7 +25,7 @@ hash^RETRODECKSOLARUSLATEST^https://github.com/RetroDECK/org.solarus_games.solar
|
|||
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
|
||||
|
||||
latestghrelease^SHADPS4LATESTGHREL^https://github.com/shadps4-emu/shadPS4/releases/latest/download/shadps4-linux-qt-*.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.
|
||||
|
|
|
@ -106,10 +106,12 @@ handle_latestghtag() {
|
|||
|
||||
handle_latestghrelease() {
|
||||
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
|
||||
|
@ -120,6 +122,7 @@ handle_latestghrelease() {
|
|||
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"
|
||||
|
|
Loading…
Reference in a new issue