Files
memby/server/internal/buildinfo/buildinfo.go
T
ponzischeme89andClaude Opus 5 4a4df7a73c App v0.2.26 and gateway 0.1.20
Client: seek controls, Bazarr subtitle download and cast panel in the
player; MDBList ratings strip; episode and schedule detail pages; series
pace estimate; what's new panel; install-permission onboarding step;
synced per-profile preferences; Emby outage banner.

Gateway: rebuilt admin console (one fragment per page), preference
history and restore, merged Continue Watching, Emby health probe,
subtitle selection and Bazarr download, structured request logging with
per-request identity, and embedded build version.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 22:33:56 +12:00

33 lines
1.1 KiB
Go

// Package buildinfo names the running gateway build.
//
// Every log line, the health endpoint and the admin page carry it, because the first
// question about any reported behaviour is "which server is that?" — and the gateway is
// deployed from a working tree rather than a tagged artefact, so nothing else can answer.
package buildinfo
import (
_ "embed"
"os"
"strings"
)
// version is the checked-in release name. It travels with the source that is deployed,
// so a container built from a tree always reports that tree's version — no build
// argument to remember and no way for the number to be right on one host and wrong on
// another.
//
//go:embed VERSION
var version string
// Version returns the running build's version. MEMBY_SERVER_VERSION overrides it, which
// is how a one-off build ("0.1.0+hotfix") can identify itself without editing the file.
func Version() string {
if override := strings.TrimSpace(os.Getenv("MEMBY_SERVER_VERSION")); override != "" {
return override
}
if trimmed := strings.TrimSpace(version); trimmed != "" {
return trimmed
}
return "unknown"
}