go-github-selfupdate/cmd/go-get-release/README.md

30 lines
985 B
Markdown
Raw Permalink Normal View History

2017-12-30 08:40:59 +00:00
Like `go get`, but it downloads and installs the latest release binary from GitHub instead.
2021-10-27 20:23:51 +00:00
Please download a binary from [release page](https://github.com/MedzikUser/go-github-selfupdate/releases/tag/go-get-release)
2018-11-10 14:12:41 +00:00
and put it in `$PATH` or build from source with `go get`.
2017-12-30 08:40:59 +00:00
```
2021-10-27 20:23:51 +00:00
$ go get -u github.com/MedzikUser/go-github-selfupdate/cmd/go-get-release
2017-12-30 08:40:59 +00:00
```
Usage is quite similar to `go get`. But `{package}` must be hosted on GitHub. So it needs to start with `github.com/`.
```
2018-11-10 14:12:41 +00:00
$ go-get-release {package}
2017-12-30 08:40:59 +00:00
```
2018-11-10 14:12:41 +00:00
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).
2017-12-30 08:40:59 +00:00
2018-11-10 14:12:41 +00:00
For example, following command downloads and installs the released binary of [ghr](https://github.com/tcnksm/ghr)
to `$GOPATH/bin`.
2017-12-30 08:40:59 +00:00
```
$ 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)
```