GoTomato/internal/metadata/version.go
Sebastian Mark 7187ebbdc1 feat(metadata): move version string to version.txt
- create version.txt to store the version number
- add function to read version from version.txt
- replace hardcoded version with dynamic retrieval
2024-11-08 14:14:28 +01:00

16 lines
353 B
Go

package metadata
import (
"os"
"strings"
)
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