prepare loader ui

This commit is contained in:
Ilia Denisov
2026-03-15 20:40:25 +02:00
parent 1ea03495f6
commit fbcf4cef99
8 changed files with 191 additions and 57 deletions
+6 -4
View File
@@ -1,10 +1,12 @@
package loader
import "galaxy/connector"
import (
"galaxy/connector"
"galaxy/util"
)
func (l *loader) newerVersion(version string) bool {
current := l.cli.Version()
return compareSemver(current, version) > 0
return util.CompareSemver(util.MustParseSemver(l.client.Version()), util.MustParseSemver(version)) > 0
}
// downloadVersion fetches given version artifact, when newer to the current version,
@@ -13,5 +15,5 @@ func (l *loader) downloadVersion(v connector.VersionInfo) {
if !l.newerVersion(v.Version) {
return
}
l.conn.DownloadVersion(v.URL)
l.connector.DownloadVersion(v.URL)
}