@@ -174,26 +174,32 @@ jobs:
174
174
175
175
# Check build status via the builds API
176
176
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
197
203
198
204
if [ $attempt -eq $max_attempts ]; then
199
205
echo "⏰ Build timeout reached (10 minutes)"
0 commit comments