fix the setup-forgetool action
This commit is contained in:
@@ -67,15 +67,10 @@ jobs:
|
|||||||
run: |-
|
run: |-
|
||||||
TAG=""
|
TAG=""
|
||||||
if RELEASES_JSON="$(curl -fsSL \
|
if RELEASES_JSON="$(curl -fsSL \
|
||||||
https://api.github.com/repos/trueforge-org/forgetool/releases)"; then
|
https://api.github.com/repos/trueforge-org/forgetool/releases/latest)"; then
|
||||||
TAG="$(jq -r '[.[]
|
TAG="$(jq -r '.tag_name // empty' <<< "${RELEASES_JSON}")"
|
||||||
| 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}")"
|
|
||||||
fi
|
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="${TAG#v}"
|
||||||
VERSION="${VERSION#forgetool-v}"
|
VERSION="${VERSION#forgetool-v}"
|
||||||
case "$(uname -m)" in
|
case "$(uname -m)" in
|
||||||
|
|||||||
Reference in New Issue
Block a user