Skip to content

🎧 Your Personal Streaming Service

Strip 'v' prefix from version, to make it consistent for release and snapshot

Deluanf28e8118dca8
diff --git a/consts/version.go b/consts/version.go
index 38f7f7992..2cab0de8f 100644
--- a/consts/version.go
+++ b/consts/version.go
@@ -1,6 +1,9 @@
package consts
-import "fmt"
+import (
+ "fmt"
+ "strings"
+)
var (
// This will be set in build time. If not, version will be set to "dev"
@@ -11,10 +14,12 @@ var (
// Formats:
// dev
// v0.2.0 (5b84188)
+// v0.3.2-SNAPSHOT (715f552)
// master (9ed35cb)
func Version() string {
if gitSha == "" {
return "dev"
}
+ gitTag = strings.TrimPrefix(gitTag, "v")
return fmt.Sprintf("%s (%s)", gitTag, gitSha)
}