Hide build version behind plus character (fixes #473)

This commit is contained in:
Jakob Borg
2014-08-05 19:38:31 +02:00
parent 8ce8476547
commit 4be6a54bc0
4 changed files with 10 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ var l = logger.DefaultLogger
func init() {
if Version != "unknown-dev" {
// If not a generic dev build, version string should come from git describe
exp := regexp.MustCompile(`^v\d+\.\d+\.\d+(-beta\d+)?(-\d+-g[0-9a-f]+)?(-dirty)?$`)
exp := regexp.MustCompile(`^v\d+\.\d+\.\d+(-[a-z0-9]+)*(\+\d+-g[0-9a-f]+)?(-dirty)?$`)
if !exp.MatchString(Version) {
l.Fatalf("Invalid version string %q;\n\tdoes not match regexp %v", Version, exp)
}