updated
This commit is contained in:
12
skm.sh
12
skm.sh
@@ -32,11 +32,17 @@ detect_platform() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# ── Fixed function ──────────────────────────────────────
|
||||||
get_latest_tag() {
|
get_latest_tag() {
|
||||||
need curl
|
need curl
|
||||||
curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" \
|
local json tag
|
||||||
| grep -m1 '"tag_name":' \
|
json="$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest")"
|
||||||
| sed -E 's/.*"tag_name": *"([^"]+)".*/\1/'
|
tag="$(printf '%s\n' "$json" | sed -nE 's/.*"tag_name": *"([^"]+)".*/\1/p' | head -n1)"
|
||||||
|
if [ -z "$tag" ]; then
|
||||||
|
echo "❌ Failed to determine latest release tag from GitHub API" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
printf '%s\n' "$tag"
|
||||||
}
|
}
|
||||||
|
|
||||||
build_url() {
|
build_url() {
|
||||||
|
|||||||
Reference in New Issue
Block a user