[MM-27942] Request arch-specific plugin (#15436)
* request arch-specific plugin * rename arch/architecture to platform Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
716b64a99c
Коммит
42f539fa57
@@ -11,6 +11,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"runtime"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -671,6 +672,8 @@ func (a *App) getBaseMarketplaceFilter() *model.MarketplacePluginFilter {
|
|||||||
filter.BuildEnterpriseReady = true
|
filter.BuildEnterpriseReady = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
filter.Platform = runtime.GOOS + "-" + runtime.GOARCH
|
||||||
|
|
||||||
return filter
|
return filter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ type MarketplacePluginFilter struct {
|
|||||||
BuildEnterpriseReady bool
|
BuildEnterpriseReady bool
|
||||||
EnterprisePlugins bool
|
EnterprisePlugins bool
|
||||||
LocalOnly bool
|
LocalOnly bool
|
||||||
|
Platform string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApplyToURL modifies the given url to include query string parameters for the request.
|
// ApplyToURL modifies the given url to include query string parameters for the request.
|
||||||
@@ -95,6 +96,7 @@ func (filter *MarketplacePluginFilter) ApplyToURL(u *url.URL) {
|
|||||||
q.Add("build_enterprise_ready", strconv.FormatBool(filter.BuildEnterpriseReady))
|
q.Add("build_enterprise_ready", strconv.FormatBool(filter.BuildEnterpriseReady))
|
||||||
q.Add("enterprise_plugins", strconv.FormatBool(filter.EnterprisePlugins))
|
q.Add("enterprise_plugins", strconv.FormatBool(filter.EnterprisePlugins))
|
||||||
q.Add("local_only", strconv.FormatBool(filter.LocalOnly))
|
q.Add("local_only", strconv.FormatBool(filter.LocalOnly))
|
||||||
|
q.Add("platform", filter.Platform)
|
||||||
u.RawQuery = q.Encode()
|
u.RawQuery = q.Encode()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user