MCPcopy Index your code
hub / github.com/devspace-sh/devspace / SetVersion

Function SetVersion

pkg/devspace/upgrade/upgrade.go:59–74  ·  view source on GitHub ↗

SetVersion sets the application version

(verText string)

Source from the content-addressed store, hash-verified

57
58// SetVersion sets the application version
59func SetVersion(verText string) {
60 if len(verText) > 0 {
61 if verText[0] != 'v' {
62 verText = "v" + verText
63 }
64
65 _version, err := eraseVersionPrefix(verText)
66 if err != nil {
67 log.GetInstance().Errorf("Error parsing version: %v", err)
68 return
69 }
70
71 version = _version
72 rawVersion = verText
73 }
74}
75
76var (
77 latestVersion string

Callers 2

mainFunction · 0.92
TestSetVersionFunction · 0.85

Calls 3

GetInstanceFunction · 0.92
eraseVersionPrefixFunction · 0.85
ErrorfMethod · 0.45

Tested by 1

TestSetVersionFunction · 0.68