fix the setup-forgetool action
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user