Skip to content

Commit

Permalink
feaet(registry): update client library
Browse files Browse the repository at this point in the history
  • Loading branch information
christophwitzko committed Feb 4, 2023
1 parent 9746cf6 commit d38f5b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/Masterminds/semver/v3 v3.2.0
github.com/cavaliergopher/grab/v3 v3.0.1
github.com/go-semantic-release/plugin-registry v1.4.0
github.com/go-semantic-release/plugin-registry v1.8.0
github.com/google/go-github/v49 v49.1.1-0.20230111123143-ced4abd274f3
github.com/hashicorp/go-hclog v1.4.0
github.com/hashicorp/go-plugin v1.4.8
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbS
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-semantic-release/plugin-registry v1.4.0 h1:hp/M6zjmv5fKIyTuqKgdvZi6WrHmXUIfswhgv4Q3xMg=
github.com/go-semantic-release/plugin-registry v1.4.0/go.mod h1:UauFd53y1hbnb4VMCeJkMVa2j8YVNioSAnh4qByYapw=
github.com/go-semantic-release/plugin-registry v1.8.0 h1:Q+klx/p+d59yf3vF5A+YI8CQM2ycPirYDvo73vzUBjU=
github.com/go-semantic-release/plugin-registry v1.8.0/go.mod h1:cdjOLL5t7sa3TqcFegOY0GiqdPseXJnvWM8IwjRy/qU=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
Expand Down
9 changes: 1 addition & 8 deletions pkg/plugin/discovery/resolver/registry/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"runtime"
"sort"
"strings"

"github.com/Masterminds/semver/v3"
"github.com/go-semantic-release/plugin-registry/pkg/client"
Expand All @@ -14,19 +13,13 @@ import (
"github.com/go-semantic-release/semantic-release/v2/pkg/plugin/discovery/resolver"
)

const DefaultEndpoint = "https://registry.go-semantic-release.xyz/api/v2"

type Resolver struct {
client *client.Client
}

func NewResolver(endpoint string) *Resolver {
if endpoint == "" {
endpoint = DefaultEndpoint
}
endpoint = strings.TrimSuffix(endpoint, "/")
if !strings.HasSuffix(endpoint, "/api/v2") {
endpoint = fmt.Sprintf("%s/api/v2", endpoint)
endpoint = client.DefaultProductionEndpoint
}
return &Resolver{
client: client.New(endpoint),
Expand Down

0 comments on commit d38f5b1

Please sign in to comment.