mirror of
https://github.com/better-auth/better-auth.git
synced 2026-06-04 05:16:36 -05:00
fix(ci): fix grep -c fallback producing invalid integer in release validation
grep -coP outputs "0" to stdout on no matches but exits 1, causing the || echo 0 fallback to append a second "0". The resulting "0\n0" value fails the -lt integer comparison. Use || true instead since grep -c already outputs the correct count.
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -177,8 +177,8 @@ jobs:
|
||||
fi
|
||||
|
||||
# Count PR links in both files
|
||||
RAW_COUNT=$(grep -coP '\[#\d+\]' "$RAW_PATH" || echo 0)
|
||||
FINAL_COUNT=$(grep -coP '\[#\d+\]' "$FINAL" || echo 0)
|
||||
RAW_COUNT=$(grep -coP '\[#\d+\]' "$RAW_PATH" || true)
|
||||
FINAL_COUNT=$(grep -coP '\[#\d+\]' "$FINAL" || true)
|
||||
|
||||
if [ "$FINAL_COUNT" -lt "$RAW_COUNT" ]; then
|
||||
echo "::warning::AI output has fewer PR links ($FINAL_COUNT) than raw ($RAW_COUNT). Falling back to raw notes."
|
||||
|
||||
Reference in New Issue
Block a user