#github #tags #github-api #latest #repository #git-repository #http-request

app github-latest

Get latest tag(s) for GitHub repositories

8 releases

new 0.3.0 Dec 9, 2024
0.2.4 Dec 4, 2024
0.2.3 Oct 18, 2024
0.2.2 Jul 26, 2024
0.1.1 Jan 18, 2024

#257 in Development tools

Download history 7/week @ 2024-09-11 5/week @ 2024-09-18 7/week @ 2024-09-25 2/week @ 2024-10-02 198/week @ 2024-10-16 9/week @ 2024-10-23 1/week @ 2024-10-30 4/week @ 2024-11-06 214/week @ 2024-12-04

214 downloads per month

MIT license

16KB
92 lines

About

Get latest release tag(s) for GitHub repositories

This utility pulls the GitHub repository tags webpage via the reqwest asynchronous API. It does not pull subsequent pages, so it only presents the latest tags appearing on the first page. By default tags containing rc, pre, or canary are ignored, and only the first / latest tag is shown, but these behaviors can be modified via the -e and -a options, respectively.

If you need a more general / flexible utility, please try git ls-remote -t REPO, which can query remote git repositories at GitHub and elsewhere via any supported protocol, and will print all tags.

Usage

$ github-latest -V
github-latest 0.3.0
$ github-latest -h
Get latest tag(s) for GitHub repositories

Usage: github-latest [OPTIONS] [REPO]...

Arguments:
  [REPO]...  One or more GitHub repositories (`qtfkwk/github-latest`)

Options:
  -e <EXCLUDE>      Exclude tags with [default: rc,pre,canary]
  -a                Show all tags (on the first tags page)
  -q                Quiet mode; just show the latest tag(s)
  -h, --help        Print help
  -V, --version     Print version

Examples

$ github-latest qtfkwk/github-latest
| Repository           | Latest |
|----------------------|--------|
| qtfkwk/github-latest | 0.2.4  |

$ github-latest qtfkwk/github-latest -a
| Repository           | Latest                                          |
|----------------------|-------------------------------------------------|
| qtfkwk/github-latest | 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.1.1, 0.1.0 |

$ github-latest qtfkwk/github-latest -q
0.2.4

Changelog

  • 0.1.0 (2024-01-18): Initial release
    • 0.1.1 (2024-01-18): Remove scraper dependency
  • 0.2.0 (2024-01-24): Pull the /tags page instead of the main repo page; URL decoding via urlencoding; -e and -a options; improve doc; update dependencies
    • 0.2.1 (2024-03-11): Update dependencies
    • 0.2.2 (2024-07-26): Fix makefile; update dependencies
    • 0.2.3 (2024-10-18): Update dependencies
    • 0.2.4 (2024-12-04): Update dependencies; add commit target to makefile
  • 0.3.0 (2024-12-09): Add -q option; update dependencies

Dependencies

~9–22MB
~323K SLoC