Quantcast
Channel: How do I capture the latest GitHub release of a project from the API? - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How do I capture the latest GitHub release of a project from the API?

$
0
0

I am trying to grab the download url of latest release from GitHub API page.

I first need to capture all the lines which start with browser_download_url and further grab the one having linux64 in them.

Target link currently which it should capture - https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz

After some research , i tried doing the following -

curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest | grep "browser_download_url | grep 'linux64[.]gz' | head -n 1 | cut -d '"' -f 4

But it doesn't seem to work.

Also it doesn't necessarily have to be an edit of my attempt, I don't mind if awk, sed etc are used in answers


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images