Skip to content

Commit 2719510

Browse files
committed
Use grep -Fxvf instead of comm for version diff
comm requires lexicographic sort but sort -V gives semver order, so the previous version errored with 'file 1 is not in sorted order'.
1 parent 9479412 commit 2719510

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/check-update.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,16 @@ jobs:
1717
# Stable versions from the ESP component registry (exclude pre-releases)
1818
AVAILABLE=$(curl -s "https://components.espressif.com/api/components/espressif/esp_hosted" \
1919
| jq -r '.versions[].version' \
20-
| grep -viE 'rc|alpha|beta|dev' \
21-
| sort -V)
20+
| grep -viE 'rc|alpha|beta|dev')
2221
2322
# Versions already released (strip leading v, skip manifest tag)
2423
RELEASED=$(gh release list --repo "${{ github.repository }}" --limit 200 \
2524
--json tagName -q '.[].tagName' \
2625
| grep -v '^manifest$' \
27-
| sed 's/^v//' \
28-
| sort -V)
26+
| sed 's/^v//')
2927
30-
# Versions available but not yet released
31-
MISSING=$(comm -23 <(echo "$AVAILABLE") <(echo "$RELEASED"))
28+
# Versions available but not yet released, sorted oldest-first
29+
MISSING=$(grep -Fxv -f <(echo "$RELEASED") <<< "$AVAILABLE" | sort -V || true)
3230
3331
echo "Available stable versions:"
3432
echo "$AVAILABLE"

0 commit comments

Comments
 (0)