diff --git a/Makefile b/Makefile
index 8a64228..896d2eb 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ mumbledj: main.go commands.go parseconfig.go strings.go service.go youtube_dl.go
go get github.com/karmakaze/goop
rm -rf Goopfile.lock
goop install
- goop go build -o mumbledj
+ goop go build -o mumbledj -ldflags '-X strings.VERSION $(shell git describe --tags --dirty)'
clean:
rm -f mumbledj*
diff --git a/main.go b/main.go
index 53f843b..6a84f91 100644
--- a/main.go
+++ b/main.go
@@ -214,7 +214,7 @@ func main() {
flag.Parse()
if version {
- fmt.Printf("MumbleDJ %s\n", VERSION)
+ fmt.Printf("MumbleDJ v%s\n", VERSION)
os.Exit(0)
}
diff --git a/strings.go b/strings.go
index 1a56ec8..e796e3d 100644
--- a/strings.go
+++ b/strings.go
@@ -8,10 +8,10 @@
package main
// Current version of the bot
-const VERSION = "v2.8.15"
+var VERSION = "Unknown"
// Message shown to users when they request the version of the bot
-const DJ_VERSION = "MumbleDJ " + VERSION + ""
+var DJ_VERSION = "MumbleDJ v" + VERSION + ""
// Message shown to users when the bot has an invalid API key.
const INVALID_API_KEY = "MumbleDJ does not have a valid %s API key."