fix(sensor-proxy): skip prerelease versions in selfheal update check
The selfheal timer was downloading prerelease versions (e.g., v5.0.0-rc.1)
even when users had the stable channel selected. This happened because
fetch_latest_release_tag() didn't filter out prereleases from the GitHub
releases API response.
Now both the Python-based parser and the grep fallback skip prereleases:
- Python: checks `release.get("prerelease")` field
- Grep fallback: filters out -rc, -alpha, -beta patterns
Related to #849
This commit is contained in:
parent
06ae5295b3
commit
609aa98030
1 changed files with 4 additions and 1 deletions
|
|
@ -1422,6 +1422,8 @@ except json.JSONDecodeError:
|
|||
sys.exit(1)
|
||||
|
||||
for release in releases:
|
||||
if release.get("prerelease"):
|
||||
continue
|
||||
tag_name = (release.get("tag_name") or "").strip()
|
||||
if not tag_name or tag_name.startswith("helm-chart"):
|
||||
continue
|
||||
|
|
@ -1438,7 +1440,8 @@ sys.exit(0)
|
|||
fi
|
||||
|
||||
if [[ -z "$tag" ]]; then
|
||||
tag=$(printf '%s\n' "$response" | grep -o '"tag_name"[[:space:]]*:[[:space:]]*"[^"]*"' | cut -d'"' -f4 | grep -Ev '^helm-chart-' | head -n 1 || true)
|
||||
# Fallback: use grep-based parsing, filtering out helm-chart and common prerelease patterns
|
||||
tag=$(printf '%s\n' "$response" | grep -o '"tag_name"[[:space:]]*:[[:space:]]*"[^"]*"' | cut -d'"' -f4 | grep -Ev '^helm-chart-|-rc\.|-(alpha|beta|rc)[0-9]*$' | head -n 1 || true)
|
||||
fi
|
||||
|
||||
if [[ -n "$tag" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in a new issue