gh-latest

module
v1.0.5-0...-7f80d7f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2022 License: MIT

README

= GitHub Repo Release Lookup

image:https://www.travis-ci.org/Foxcapades/gh-latest.svg?branch=master["Build Status", link="https://www.travis-ci.org/Foxcapades/gh-latest"]
image:https://img.shields.io/github/v/release/Foxcapades/gh-latest[GitHub release (latest SemVer), link="https://github.com/Foxcapades/gh-latest/releases/latest"]
image:https://img.shields.io/github/license/Foxcapades/gh-latest[GitHub]

A simple tool that reports the latest release of a given GitHub repository.

Does not use the API to avoid rate limiting.

== Download

Downloads for Linux, Mac, and Windows are available from the releases page.

Or using `go get` to install:

[source, console]
----
go get -u github.com/Foxcapades/gh-latest/cmd/gh-latest
----

== Usage

.Basic Usage
[source, console]
----
$ gh-latest Foxcapades/gh-latest
{
 "version": "v1.0.3",
 "files": [
  "https://github.com/Foxcapades/gh-latest/releases/download/v1.0.3/gh-latest-darwin.v1.0.3.tar.gz",
  "https://github.com/Foxcapades/gh-latest/releases/download/v1.0.3/gh-latest-linux.v1.0.3.tar.gz",
  "https://github.com/Foxcapades/gh-latest/releases/download/v1.0.3/gh-latest-windows.v1.0.3.zip"
 ]
}
----

.Get just the release tag
[source, console]
----
$ gh-latest -t Foxcapades/gh-latest
v1.0.3
----

.Get just the download urls
[source, console]
----
$ gh-latest -u Foxcapades/gh-latest
https://github.com/Foxcapades/gh-latest/releases/download/v1.0.3/gh-latest-darwin.v1.0.3.tar.gz
https://github.com/Foxcapades/gh-latest/releases/download/v1.0.3/gh-latest-linux.v1.0.3.tar.gz
https://github.com/Foxcapades/gh-latest/releases/download/v1.0.3/gh-latest-windows.v1.0.3.zip
----

.Help text
[source, console]
----
$ gh-latest -h
Usage:
  gh-latest [OPTIONS] <User/Repo>

Options
  -u | --urls-only  Print the output as a list of urls rather than a json object.
                    Cannot be used with -t/--tag-only
  -t | --tag-only   Print only the latest release tag rather than a json object.
                    Cannot be used with -u/--urls-only
  -v | --version    Prints this application's version.


Help & Info
  -h | --help  Prints this help text


Positional Arguments

  User/Repo  Required.
----

Directories

Path Synopsis
cmd
internal
gh

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL