Skip to content

chmouel/gh-get-asset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gh-get-asset

Fetch an asset (ie: binary) from a GitHub release

Installation

gh extension install chmouel/gh-get-asset

Requirements

Usage

gh get-asset extension let you download an asset (ie: binary or others) from a release page.

by default the first argument is the owner/repo and second argument is a substring in the asset.

example:

gh get-asset chmouel/gosmee Linux-ARM64.rpm

this will grab the latest release from gosmee that has Linux-ARM64.rpm in the binary name.

If you want to output it to another file or location you can use -o :

gh get-asset -o/tmp/gosmee.rpm chmouel/gosmee Linux-ARM64.rpm && rpm -Uvh /tmp/gosmee.rpm

If you have multiple binary matching it will get all of them (incompatible with -o option)

You can add -s for silent te output of curl (useful for crons)

By default it will always grab the latest release unless you specify -r RELEASE to grab another release.

Copyright

Apache-2.0

TODO

  • Use gh token to grab releases/asset for private repos.

Authors

Chmouel Boudjnah

About

GH extensions to get an asset from a release

Topics

Resources

License

Stars

Watchers

Forks

Languages