Skip to content

Commit

Permalink
Update GetDownloadCount.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shupershuff authored Sep 12, 2024
1 parent 804c8be commit d512712
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/GetDownloadCount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ jobs:
# Debug: Print releases to check the response
echo "Releases data: $releases"
echo "test0"
# Check if releases is empty or not valid JSON
if [ -z "$releases" ] || ! echo "$releases" | jq empty; then
echo "Error: No releases found or invalid JSON response."
exit 1
fi
# Initialize variables for max downloads
max_download_count=0
release_with_max_downloads=""
# Iterate through each release
# Iterate through each release
echo "$releases" | jq -c '.[]' | while read -r release; do
release_data=$(echo "$release" | jq '.')
download_count=$(echo "$release_data" | jq '[.assets[].download_count // 0] | add')
Expand Down

0 comments on commit d512712

Please sign in to comment.