Skip to content

Commit 428d9a8

Browse files
committed
Improve JitPack build monitoring
- Parse status from JSON response properly - Handle actual JitPack status values (none, tagNotFound) - Remove verbose JSON output for cleaner logs - Add specific handling for tag sync delays
1 parent f0efa58 commit 428d9a8

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

.github/workflows/release.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -174,26 +174,32 @@ jobs:
174174
175175
# Check build status via the builds API
176176
status_response=$(curl -s "https://jitpack.io/api/builds/com.github.wassertim/dynamodb-toolkit/v$NEW_VERSION")
177-
echo "Status response: $status_response"
178-
179-
# Debug: Show what we're matching against
180-
echo "Checking for pattern: '\"status\" : \"ok\"'"
181-
182-
# Use grep for more reliable pattern matching
183-
if echo "$status_response" | grep -q '"status" : "ok"'; then
184-
echo "✅ JitPack build completed successfully!"
185-
echo "📦 Artifact available at: https://jitpack.io/#wassertim/dynamodb-toolkit/v$NEW_VERSION"
186-
echo "🔗 Build log: https://jitpack.io/com/github/wassertim/dynamodb-toolkit/v$NEW_VERSION/build.log"
187-
exit 0
188-
elif echo "$status_response" | grep -q '"status" : "error"'; then
189-
echo "❌ JitPack build failed!"
190-
echo "🔗 Check logs at: https://jitpack.io/com/github/wassertim/dynamodb-toolkit/v$NEW_VERSION/build.log"
191-
exit 1
192-
elif echo "$status_response" | grep -q '"status" : "building"'; then
193-
echo "⏳ Build in progress..."
194-
else
195-
echo "⏳ Build queued or starting..."
196-
fi
177+
178+
# Parse status and show clean output
179+
status=$(echo "$status_response" | grep -o '"status" : "[^"]*"' | cut -d'"' -f4)
180+
181+
case "$status" in
182+
"ok")
183+
echo "✅ JitPack build completed successfully!"
184+
echo "📦 Artifact available at: https://jitpack.io/#wassertim/dynamodb-toolkit/v$NEW_VERSION"
185+
echo "🔗 Build log: https://jitpack.io/com/github/wassertim/dynamodb-toolkit/v$NEW_VERSION/build.log"
186+
exit 0
187+
;;
188+
"error")
189+
echo "❌ JitPack build failed!"
190+
echo "🔗 Check logs at: https://jitpack.io/com/github/wassertim/dynamodb-toolkit/v$NEW_VERSION/build.log"
191+
exit 1
192+
;;
193+
"none")
194+
echo "⏳ Build in progress..."
195+
;;
196+
"tagNotFound")
197+
echo "⚠️ Tag not found yet, waiting for Git sync..."
198+
;;
199+
*)
200+
echo "⏳ Build status: $status"
201+
;;
202+
esac
197203
198204
if [ $attempt -eq $max_attempts ]; then
199205
echo "⏰ Build timeout reached (10 minutes)"

0 commit comments

Comments
 (0)