bug: Fix version list (#1323)

* 🐛 Fix version list

First version in the list is the latest one.
Alos moves the check for same version above the current place, so it can
check before asking if you want to update to the same version

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🌱 Rework versioning for upgrade

Use the semver lib to parse the versions into a proper collection where
it can be parsed and versions compared and sorted properly

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🤖 lint

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
Itxaka
2023-04-20 09:57:58 +02:00
parent eb16cdc2b9
commit 97fb443344

1
go.mod
View File

@@ -3,6 +3,7 @@ module github.com/kairos-io/kairos/v2
go 1.20
require (
github.com/Masterminds/semver/v3 v3.1.1
github.com/avast/retry-go v3.0.0+incompatible
github.com/erikgeiser/promptkit v0.8.0
github.com/google/go-github/v40 v40.0.0