This repository has been archived on 2026-04-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
core/server/version.go
gobha b7746c3004 Changeset 0.37.14 (#226)
Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
2026-03-23 16:47:48 +00:00

26 lines
522 B
Go

package main
import (
"os"
"strings"
)
// Version is the application version.
// In Docker builds, injected via ldflags from the VERSION file.
// In local dev, read from ../VERSION at startup.
var Version = "dev"
func init() {
if Version == "dev" {
if b, err := os.ReadFile("../VERSION"); err == nil {
if v := strings.TrimSpace(string(b)); v != "" {
Version = v
}
} else if b, err := os.ReadFile("VERSION"); err == nil {
if v := strings.TrimSpace(string(b)); v != "" {
Version = v
}
}
}
}