33 lines
833 B
Go
33 lines
833 B
Go
package version
|
|
|
|
import (
|
|
"regexp"
|
|
)
|
|
|
|
/*
|
|
These variables are automatically handled by the build script.
|
|
|
|
DO NOT MODIFY THESE VARIABLES.
|
|
Refer to /build.sh for how these are generated at build time and populated.
|
|
*/
|
|
var (
|
|
sourceControl string = "git"
|
|
version string = "(unknown)"
|
|
commitHash string
|
|
commitShort string
|
|
numCommitsAfterTag string
|
|
isDirty string
|
|
buildTime string
|
|
buildUser string
|
|
buildSudoUser string
|
|
buildHost string
|
|
)
|
|
|
|
var (
|
|
patchRe *regexp.Regexp = regexp.MustCompile(`^(?P<patch>[0-9+])(?P<pre>-[0-9A-Za-z.-]+)?(?P<build>\+[0-9A-Za-z.-]+)?$`)
|
|
patchReIsolated *regexp.Regexp = regexp.MustCompile(`^([0-9]+)(?:[-+](.*)?)?$`)
|
|
)
|
|
|
|
// Ver is populated by main() from the build script and used in other places.
|
|
var Ver *BuildInfo
|