prepare loader ui
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user