Skip to content

Commit b810282

Browse files
fix(scripts): use tags API for Liquorix version resolution
Liquorix publishes tags only, not GitHub Releases. The releases API returns an empty array, causing fallback to the stale 6.12.1-1 version. Switch to the tags API and update the fallback to 6.19-6.
1 parent 0395000 commit b810282

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

scripts/resolve-lqx-version.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
#!/usr/bin/env bash
22
# scripts/resolve-lqx-version.sh — resolve the latest Liquorix/Zen kernel version
33
#
4-
# Queries the damentz/liquorix-package GitHub releases API and prints the
5-
# most recent KERNEL_MAJOR-LQX_REL string (e.g. "6.12.1-1").
4+
# Queries the damentz/liquorix-package GitHub tags API and prints the most
5+
# recent KERNEL_MAJOR-LQX_REL string (e.g. "6.19-6").
66
# Falls back to a hardcoded value if the API is unreachable.
77
#
8-
# Output format: KERNEL_MAJOR-LQX_REL (e.g. 6.12.1-1)
8+
# Output format: KERNEL_MAJOR-LQX_REL (e.g. 6.19-6)
99

1010
set -euo pipefail
1111

12-
FALLBACK_VERSION="6.12.1-1"
13-
API_URL="https://api.github.com/repos/damentz/liquorix-package/releases/latest"
12+
FALLBACK_VERSION="6.19-6"
13+
# Liquorix publishes tags only — no GitHub Releases
14+
TAGS_API="https://api.github.com/repos/damentz/liquorix-package/tags?per_page=10"
1415

1516
if ! command -v curl &>/dev/null; then
1617
echo "${FALLBACK_VERSION}"
1718
exit 0
1819
fi
1920

20-
response=$(curl -sf --max-time 10 "${API_URL}" 2>/dev/null) || {
21+
response=$(curl -sf --max-time 10 "${TAGS_API}" 2>/dev/null) || {
2122
echo "${FALLBACK_VERSION}"
2223
exit 0
2324
}
2425

25-
# Tag format is typically "MAJOR-REL" e.g. "6.12.1-1"
26+
# Tags are returned newest-first; pick the first one matching MAJOR-REL format
2627
tag=""
2728
if command -v jq &>/dev/null; then
28-
tag=$(echo "${response}" | jq -r '.tag_name // empty' 2>/dev/null)
29+
tag=$(echo "${response}" | jq -r '.[].name' 2>/dev/null \
30+
| grep -E '^[0-9]+\.[0-9]+-[0-9]+$' | head -1)
2931
else
30-
tag=$(echo "${response}" | grep -o '"tag_name":"[^"]*"' | cut -d'"' -f4)
32+
tag=$(echo "${response}" | grep -o '"name":"[^"]*"' | cut -d'"' -f4 \
33+
| grep -E '^[0-9]+\.[0-9]+-[0-9]+$' | head -1)
3134
fi
3235

3336
if [[ -n "${tag}" ]]; then

0 commit comments

Comments
 (0)