Files
pulse/internal/api/agent_version_shared.go
T
rcourtman 7f15acfbad Keep diagnostic source builds out of release update flows
Diagnostic versions must keep their exact identity without advertising a published server or agent update target. Reuse the canonical source-build classification and discard cached release offers when runtime identity changes.

Show source-build status and manual image replacement guidance. Verify release and preview controls remain available.

Refs #1913
2026-09-10 17:06:27 +01:00

16 lines
590 B
Go

package api
import "github.com/rcourtman/pulse-go-rewrite/internal/updates"
// currentAgentTargetVersion returns the canonical version string agents should
// compare themselves against. Development/source builds deliberately return an
// empty string so operator-facing surfaces do not raise false update warnings
// when the server reports "dev" to avoid agent update loops.
func currentAgentTargetVersion() string {
versionInfo, err := updates.GetCurrentVersion()
if err != nil || versionInfo.IsDevelopment || versionInfo.IsSourceBuild {
return ""
}
return versionInfo.Version
}