github-store
A simple package to be used as a GitHub store for go-update which does not prefix release tag with "v"
go-update is a go package for auto-updating system-specific binaries via GitHub releases.
The current store used by this package automatically prefix the release tag with "v".
Package thegomachine/github-store provides the same API but without prefixing release tag.
Installation
$ go get github.com/thegomachine/github-store
Usage
So previously your code might have looked like this:
import (
"github.com/tj/go-update/stores/github"
update "github.com/tj/go-update"
)
func main() {
project := &update.Manager{
Command: "foo",
Store: &github.Store{
Owner: "foo",
Repo: "bar",
Version: version,
},
}
release, err := project.Store.GetRelease("1.0.0")
// will try to find the GitHub release v1.0.0.
}
With this package:
import (
"github.com/thegomachine/github-store"
update "github.com/tj/go-update"
)
func main() {
project := &update.Manager{
Command: "foo",
Store: &github.Store{
Owner: "foo",
Repo: "bar",
Version: version,
},
}
release, err := project.Store.GetRelease("1.0.0")
// will try to find the GitHub release 1.0.0.
}