mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
include goversion used to compile mox in the mox version
This commit is contained in:
@ -2,16 +2,24 @@
|
||||
package moxvar
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"runtime/debug"
|
||||
)
|
||||
|
||||
// Version is set at runtime based on the Go module used to build.
|
||||
var Version = "(devel)"
|
||||
var Version string
|
||||
|
||||
// VersionBare does not add a "+modifications" or other suffix to the version.
|
||||
var VersionBare = "(devel)"
|
||||
// VersionBare does not add a "+modifications", goversion or other suffix to the version.
|
||||
var VersionBare string
|
||||
|
||||
func init() {
|
||||
Version = "(devel)"
|
||||
VersionBare = "(devel)"
|
||||
|
||||
defer func() {
|
||||
Version += "-" + runtime.Version()
|
||||
}()
|
||||
|
||||
buildInfo, ok := debug.ReadBuildInfo()
|
||||
if !ok {
|
||||
return
|
||||
|
Reference in New Issue
Block a user