Skip to content

Commit df45630

Browse files
committed
Improve JitPack status detection with grep
- Replace bash pattern matching with grep for more reliable detection - Add debug output to show pattern being checked - Should properly detect 'status : ok' in JSON response - Fixes issue where valid success responses weren't being recognized
1 parent 702f375 commit df45630

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,16 +165,20 @@ jobs:
165165
status_response=$(curl -s "https://jitpack.io/api/builds/com.github.wassertim/dynamodb-toolkit/v$NEW_VERSION")
166166
echo "Status response: $status_response"
167167
168-
if [[ "$status_response" == *'"status" : "ok"'* ]]; then
168+
# Debug: Show what we're matching against
169+
echo "Checking for pattern: '\"status\" : \"ok\"'"
170+
171+
# Use grep for more reliable pattern matching
172+
if echo "$status_response" | grep -q '"status" : "ok"'; then
169173
echo "✅ JitPack build completed successfully!"
170174
echo "📦 Artifact available at: https://jitpack.io/#wassertim/dynamodb-toolkit/v$NEW_VERSION"
171175
echo "🔗 Build log: https://jitpack.io/com/github/wassertim/dynamodb-toolkit/v$NEW_VERSION/build.log"
172176
exit 0
173-
elif [[ "$status_response" == *'"status" : "error"'* ]]; then
177+
elif echo "$status_response" | grep -q '"status" : "error"'; then
174178
echo "❌ JitPack build failed!"
175179
echo "🔗 Check logs at: https://jitpack.io/com/github/wassertim/dynamodb-toolkit/v$NEW_VERSION/build.log"
176180
exit 1
177-
elif [[ "$status_response" == *'"status" : "building"'* ]]; then
181+
elif echo "$status_response" | grep -q '"status" : "building"'; then
178182
echo "⏳ Build in progress..."
179183
else
180184
echo "⏳ Build queued or starting..."

0 commit comments

Comments
 (0)