diff --git a/go.mod b/go.mod index 28c77e5b..e9d7142e 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,8 @@ require ( github.com/pterm/pterm v0.12.41 github.com/urfave/cli v1.22.9 go.uber.org/zap v1.21.0 + golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 + golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0 gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v3 v3.0.1 @@ -189,7 +191,6 @@ require ( go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect golang.org/x/net v0.0.0-20220708220712-1185a9018129 // indirect golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect diff --git a/go.sum b/go.sum index 781019f7..8af32788 100644 --- a/go.sum +++ b/go.sum @@ -1817,6 +1817,7 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= +golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5 h1:rxKZ2gOnYxjfmakvUUqh9Gyb6KXfrj7JWTxORTYqb0E= golang.org/x/exp v0.0.0-20220426173459-3bcf042a4bf5/go.mod h1:lgLbSvA5ygNOMpwM/9anMpWVlVJ7Z+cHWq/eFuinpGE= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= diff --git a/internal/provider/upgrade.go b/internal/provider/upgrade.go index 0cd6ba96..34f3b259 100644 --- a/internal/provider/upgrade.go +++ b/internal/provider/upgrade.go @@ -4,9 +4,10 @@ import ( "encoding/json" "strings" - "github.com/kairos-io/kairos/pkg/utils" "github.com/google/go-containerregistry/pkg/crane" + "github.com/kairos-io/kairos/pkg/utils" "github.com/mudler/go-pluggable" + "golang.org/x/mod/semver" ) func eventError(err error) pluggable.EventResponse { @@ -31,6 +32,8 @@ func ListVersions(e *pluggable.Event) pluggable.EventResponse { } } + semver.Sort(displayTags) + versions, err := json.Marshal(displayTags) resp := &pluggable.EventResponse{ Data: string(versions),