1// Package moxvar provides the version number of a mox build.
 
8// Version is set at runtime based on the Go module used to build.
 
11// VersionBare does not add a "+modifications" or other suffix to the version.
 
12var VersionBare = "(devel)"
 
15	buildInfo, ok := debug.ReadBuildInfo()
 
19	Version = buildInfo.Main.Version
 
20	VersionBare = buildInfo.Main.Version
 
21	if Version == "(devel)" {
 
22		var vcsRev, vcsMod string
 
23		for _, setting := range buildInfo.Settings {
 
24			if setting.Key == "vcs.revision" {
 
25				vcsRev = setting.Value
 
26			} else if setting.Key == "vcs.modified" {
 
27				vcsMod = setting.Value
 
38			Version += "+modifications"