Last active
November 10, 2022 01:18
-
-
Save timsutton/49bb1e9682c64c0d26fc46c448d7aebc to your computer and use it in GitHub Desktop.
One-liner to give a total count of all downloads of a project's GitHub releases, over all time
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
owner=timsutton | |
repo=brigadier | |
curl -s "https://api.github.com/repos/${owner}/${repo}/releases \ | |
| jq . \ | |
| grep download_count \ | |
| cut -d : -f 2 \ | |
| tr -d ' ,' \ | |
| awk '{s+=$1} END {print s}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment