MCPcopy
hub / github.com/syncthing/syncthing / getReleaseVersion

Function getReleaseVersion

build.go:924–933  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

922}
923
924func getReleaseVersion() (string, error) {
925 if ver := os.Getenv("VERSION"); ver != "" {
926 return strings.TrimSpace(ver), nil
927 }
928 bs, err := os.ReadFile("RELEASE")
929 if err != nil {
930 return "", err
931 }
932 return string(bytes.TrimSpace(bs)), nil
933}
934
935func getGitVersion() (string, error) {
936 // The current version as Git sees it

Callers 1

getVersionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected