fix the setup-forgetool action

This commit is contained in:
Kjeld Schouten
2026-05-02 15:01:42 +02:00
parent d11eed3b62
commit 1dfb2ed727
+3 -8
View File
@@ -67,15 +67,10 @@ jobs:
run: |-
TAG=""
if RELEASES_JSON="$(curl -fsSL \
https://api.github.com/repos/trueforge-org/forgetool/releases)"; then
TAG="$(jq -r '[.[]
| select(.prerelease == true)
| .tag_name
| select(test("^(forgetool-)?v[0-9]+\\.[0-9]+\\.[0-9]+-ALPHA[0-9]+$"))
| {tag: ., alpha: (capture("ALPHA(?<n>[0-9]+)$").n | tonumber)}
] | if length > 0 then max_by(.alpha).tag else empty end' <<< "${RELEASES_JSON}")"
https://api.github.com/repos/trueforge-org/forgetool/releases/latest)"; then
TAG="$(jq -r '.tag_name // empty' <<< "${RELEASES_JSON}")"
fi
[ -n "${TAG}" ] && [ "${TAG}" != "null" ] || TAG="v4.0.0-ALPHA28"
[ -n "${TAG}" ] && [ "${TAG}" != "null" ] || { echo "Failed to determine latest forgetool release tag"; exit 1; }
VERSION="${TAG#v}"
VERSION="${VERSION#forgetool-v}"
case "$(uname -m)" in