add documents for go-get-release

This commit is contained in:
rhysd 2017-12-30 17:40:59 +09:00
parent a12335af1a
commit 82b1ad49fc
3 changed files with 30 additions and 2 deletions

View File

@ -27,9 +27,10 @@ If newer version than itself is detected, it downloads released binary from GitH
- Tested on Linux, macOS and Windows (using Travis CI and AppVeyor)
- Many archive and compression formats are supported (zip, gzip, tar)
And small wrapper CLI is provided:
And small wrapper CLIs are provided:
- [detect-latest-release](./cmd/detect-latest-release): Detect the latest release of given GitHub repository from command line
- [go-get-release](./cmd/go-get-release): Like `go get`, but install release binary from GitHub instead
[go-github-selfupdate]: https://github.com/rhysd/go-github-selfupdate
[GitHub Releases API]: https://developer.github.com/v3/repos/releases/

View File

@ -0,0 +1,26 @@
Like `go get`, but it downloads and installs the latest release binary from GitHub instead.
Please install using `go get`.
```
$ go get -u github.com/rhysd/go-github-selfupdate/cmd/go-get-release
```
Usage is quite similar to `go get`. But `{package}` must be hosted on GitHub. So it needs to start with `github.com/`.
```
$ detect-latest-release {package}
```
Please note that this command assumes that specified package is following Git tag naming rules and released binaries naming rules described in [README](../../README.md).
For example, following command downloads and installs the released binary of [ghr](https://github.com/tcnksm/ghr) to `$GOPATH/bin`.
```
$ go-get-release github.com/tcnksm/ghr
Command was updated to the latest version 0.5.4: /Users/you/.go/bin/ghr
$ ghr -version
ghr version v0.5.4 (a12ff1c)
```

View File

@ -31,7 +31,8 @@ Naming Rules of Git Tags:
This package is hosted on GitHub:
https://github.com/rhysd/go-github-selfupdate
Small CLI tool as wrapper of this library is available also:
Small CLI tools as wrapper of this library are available also:
https://github.com/rhysd/go-github-selfupdate/cmd/detect-latest-release
https://github.com/rhysd/go-github-selfupdate/cmd/go-get-release
*/
package selfupdate