refactor: loader package

This commit is contained in:
Ilia Denisov
2026-03-15 19:04:43 +02:00
parent 2134386625
commit 1ea03495f6
10 changed files with 5 additions and 88 deletions
+17
View File
@@ -0,0 +1,17 @@
package loader
import "galaxy/connector"
func (l *loader) newerVersion(version string) bool {
current := l.cli.Version()
return compareSemver(current, version) > 0
}
// downloadVersion fetches given version artifact, when newer to the current version,
// and stores at the App's local storage with a pre-defined name with semver suffix
func (l *loader) downloadVersion(v connector.VersionInfo) {
if !l.newerVersion(v.Version) {
return
}
l.conn.DownloadVersion(v.URL)
}