Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
fix: Prioritize VERSION file over git describe for release builds #64
rcourtman3fd37796c5ae
diff --git a/internal/updates/version.go b/internal/updates/version.goindex abb2a4efb3..64039638ce 100644--- a/internal/updates/version.go+++ b/internal/updates/version.go@@ -119,7 +119,37 @@ func (v *Version) IsPrerelease() bool {// GetCurrentVersion gets the current running versionfunc GetCurrentVersion() (*VersionInfo, error) {- // Try to get version from git first (development)+ // Try to read from VERSION file first (release builds)+ versionPaths := []string{+ "VERSION",+ "/opt/pulse/VERSION",+ filepath.Join(filepath.Dir(os.Args[0]), "VERSION"),+ }++ for _, path := range versionPaths {+ versionBytes, err := os.ReadFile(path)+ if err == nil {+ version := strings.TrimSpace(string(versionBytes))+ if version != "" {+ // Determine channel from version string+ channel := "stable"+ if strings.Contains(strings.ToLower(version), "rc") {+ channel = "rc"+ }+ return &VersionInfo{+ Version: version,+ Build: "release",+ Runtime: "go",+ Channel: channel,+ IsDevelopment: false,+ IsDocker: isDockerEnvironment(),+ DeploymentType: GetDeploymentType(),+ }, nil+ }+ }+ }++ // Fall back to git (development builds)gitVersion, err := getGitVersion()if err == nil && gitVersion != "" {// Determine channel from git version@@ -138,34 +168,6 @@ func GetCurrentVersion() (*VersionInfo, error) {}, nil}- // Try to read from VERSION file in multiple locations- versionPaths := []string{- "VERSION",- "/opt/pulse/VERSION",- filepath.Join(filepath.Dir(os.Args[0]), "VERSION"),- }-- for _, path := range versionPaths {- versionBytes, err := os.ReadFile(path)- if err == nil {- version := strings.TrimSpace(string(versionBytes))- // Determine channel from version string- channel := "stable"- if strings.Contains(strings.ToLower(version), "rc") {- channel = "rc"- }- return &VersionInfo{- Version: version,- Build: "release",- Runtime: "go",- Channel: channel,- IsDevelopment: false,- IsDocker: isDockerEnvironment(),- DeploymentType: GetDeploymentType(),- }, nil- }- }-// Final fallbackversion := "4.24.0-rc.1"channel := "stable"