diff --git a/go.mod b/go.mod index b9acf5e2..75cf6216 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 05e8dfe9..08eaecf8 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/pkg/plugin/discovery/resolver/registry/registry.go b/pkg/plugin/discovery/resolver/registry/registry.go index 63bfbab0..6bb8db6c 100644 --- a/pkg/plugin/discovery/resolver/registry/registry.go +++ b/pkg/plugin/discovery/resolver/registry/registry.go @@ -5,7 +5,6 @@ import ( "fmt" "runtime" "sort" - "strings" "github.com/Masterminds/semver/v3" "github.com/go-semantic-release/plugin-registry/pkg/client" @@ -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),