mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
7f15acfbad
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
16 lines
590 B
Go
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
|
|
}
|