Explorar el Código

Allow beta versions

Jakob Borg hace 11 años
padre
commit
28f2e8f24d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      cmd/syncthing/main.go

+ 1 - 1
cmd/syncthing/main.go

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