1// Package moxvar provides the version number of a mox build.
9// Version is set at runtime based on the Go module used to build.
12// VersionBare does not add a "+modifications", goversion or other suffix to the version.
17 VersionBare = "(devel)"
20 Version += "-" + runtime.Version()
23 buildInfo, ok := debug.ReadBuildInfo()
27 Version = buildInfo.Main.Version
28 VersionBare = buildInfo.Main.Version
29 if Version == "(devel)" {
30 var vcsRev, vcsMod string
31 for _, setting := range buildInfo.Settings {
32 if setting.Key == "vcs.revision" {
33 vcsRev = setting.Value
34 } else if setting.Key == "vcs.modified" {
35 vcsMod = setting.Value
46 Version += "+modifications"