From 44754749a80ba2dd6e1f00fd8d9522ae52699758 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Tue, 4 Feb 2025 10:25:37 +0900 Subject: [PATCH] FLATHUB_PUSH: fix prerelease fetch [skip ci] --- automation_tools/flathub_push_main.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation_tools/flathub_push_main.sh b/automation_tools/flathub_push_main.sh index 4c8f955c..68b63fca 100755 --- a/automation_tools/flathub_push_main.sh +++ b/automation_tools/flathub_push_main.sh @@ -34,8 +34,8 @@ fi git clone --depth=1 --recursive "https://github.com/$flathub_target_repo.git" "$gits_folder/flathub" git clone --depth=1 --recursive "https://github.com/$retrodeck_repo.git" "$gits_folder/RetroDECK" -# Get the latest release name, preferring prereleases if available -relname=$(curl -s https://api.github.com/repos/$retrodeck_repo/releases | jq -r '[.[] | select(.prerelease == true)][0].tag_name // empty') +# Get the latest release name, preferring prereleases if available and published after 2025-01-01 +relname=$(curl -s https://api.github.com/repos/$retrodeck_repo/releases | jq -r '[.[] | select(.prerelease == true and (.published_at | fromdateiso8601) > (strptime("2025-01-01T00:00:00Z") | mktime))][0].tag_name // empty') if [ -z "$relname" ]; then relname=$(curl -s https://api.github.com/repos/$retrodeck_repo/releases/latest | jq -r .tag_name) fi