MCPcopy Create free account
hub / github.com/devspace-sh/devspace / CheckForNewerVersion

Function CheckForNewerVersion

pkg/devspace/upgrade/upgrade.go:83–100  ·  view source on GitHub ↗

CheckForNewerVersion checks if there is a newer version on github and returns the newer version

()

Source from the content-addressed store, hash-verified

81
82// CheckForNewerVersion checks if there is a newer version on github and returns the newer version
83func CheckForNewerVersion() (string, error) {
84 latestVersionOnce.Do(func() {
85 latest, found, err := selfupdate.DetectLatest(githubSlug)
86 if err != nil {
87 latestVersionErr = err
88 return
89 }
90
91 v := semver.MustParse(version)
92 if !found || latest.Version.Equals(v) {
93 return
94 }
95
96 latestVersion = latest.Version.String()
97 })
98
99 return latestVersion, latestVersionErr
100}
101
102// NewerVersionAvailable checks if there is a newer version of devspace
103func NewerVersionAvailable() string {

Callers 2

NewerVersionAvailableFunction · 0.85
UpgradeFunction · 0.85

Calls 2

EqualsMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected