diff --git a/internal/metadata/version.go b/internal/metadata/version.go index 22e394e..13b8f6e 100644 --- a/internal/metadata/version.go +++ b/internal/metadata/version.go @@ -1,6 +1,16 @@ package metadata -import "strings" +import ( + "os" + "strings" +) -const GoTomatoVersion = "0.1.1" // The GoTomato version +func getVersion() string { + content, _ := os.ReadFile("version.txt") + version := strings.TrimSpace(string(content)) + + return version +} + +var GoTomatoVersion = getVersion() // The GoTomato version var ProtocolVersion = strings.Split(GoTomatoVersion, ".")[0] // The protocol version diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..d64531f --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +devel