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

Sachin

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

Gilles Quenot

Like this:

curl -s 'https://api.github.com/repos/mozilla/geckodriver/releases/latest' | 
    jq -r '.assets[].browser_download_url' |
    grep linux64

https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I get the commit hash of the latest release from Github API

How do I update Wagtail to the latest release?

Download link for latest release of GitHub project

C++ - Get latest release of a GitHub project

How do I upgrade from Ubuntu 10.04 LTS to the latest stable release?

How do I push a release to github with the maven release plugin?

How do I release only changes project from multiple project in one .sln?

Is there a way to download an artifact from the latest release on GitHub?

How to get the latest release date of a github repo

How to change a release on Github point to the latest commit?

How to get GitHub repo latest release in Python?

Does Github pages have a built in way of accessing and caching the latest release from the API?

How do I commit a Vapor project to GitHub?

How do I compile and run a project on github?

How do I remove features from an API Platform project?

How Do I Capture The Value From This HTML?

How do I capture the URI from a registerActivityResult?

How do I download binary files of a GitHub release?

How do I fork a github project to a git repo outside github?

How can I find the latest commit from forked repos on github?

How do I make an existing project on my machine into a GitHub project?

How do I edit github file from web-browser with github API?

How can I add a project from Github to Github without the commits?

How Can i Push Latest Project Files From Git To Gitlab?

How do I include library from github in python project without pip?

How do I add my project from Android Studio to my GitHub page?

How do I remove my Visual Studio 2013 project from a Github repository?

How do I edit a github Android API?

Ansible - Download latest release binary from Github repo

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  3. 3

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  4. 4

    pump.io port in URL

  5. 5

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    Do Idle Snowflake Connections Use Cloud Services Credits?

  9. 9

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  10. 10

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  11. 11

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  12. 12

    Generate random UUIDv4 with Elm

  13. 13

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  14. 14

    Is it possible to Redo commits removed by GitHub Desktop's Undo on a Mac?

  15. 15

    flutter: dropdown item programmatically unselect problem

  16. 16

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  17. 17

    EXCEL: Find sum of values in one column with criteria from other column

  18. 18

    Pandas - check if dataframe has negative value in any column

  19. 19

    How to use merge windows unallocated space into Ubuntu using GParted?

  20. 20

    Make a B+ Tree concurrent thread safe

  21. 21

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

HotTag

Archive