Created
March 19, 2021 09:26
-
-
Save cideM/0e35d6b5d8c859e3017fefbed63846c1 to your computer and use it in GitHub Desktop.
This file contains 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
echo '[{"name":"v1.22.10","zipball_url":"https://api.github.com/repos/yarnpkg/yarn/zipball/v1.22.10","tarball_url":"https://api.github.com/repos/yarnpkg/yarn/tarball/v1.22.10","commit":{"sha":"785cda8020aa5f513d6f60b8349bca8dab9dd79b","url":"https://api.github.com/repos/yarnpkg/yarn/commits/785cda8020aa5f513d6f60b8349bca8dab9dd79b"},"node_id":"MDM6UmVmNDk5NzA2NDI6cmVmcy90YWdzL3YxLjIyLjEw"}]' | tr ',' '\n' | awk -F'":"' '{ version; gsub(/"/, "", $2); if ($1 ~ /name/ ) { version = $2; } if ($1 ~ /tarball/) { gsub(/v/, "", version); print version, $2; } }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment