CI: use tags for cppcheck update (#2976)

This commit is contained in:
Adeeb Shihadeh
2025-12-20 14:17:28 -08:00
committed by GitHub
parent f7201a2379
commit 622f2b14b2

View File

@@ -17,7 +17,11 @@ jobs:
- name: Get latest cppcheck version
id: version
run: |
LATEST=$(curl -fsSL https://api.github.com/repos/danmar/cppcheck/releases/latest | jq -r .tag_name)
# Tags are sorted by time (newest first), so get the first version-like tag
LATEST=$(curl -fsSL "https://api.github.com/repos/danmar/cppcheck/tags?per_page=20" | \
jq -r '.[].name' | \
grep -E '^[0-9]+\.[0-9]+(\.[0-9]+)?$' | \
head -n 1)
echo "vers=$LATEST" >> "$GITHUB_OUTPUT"
- name: Update VERS in install.sh
run: |