mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-19 16:27:37 +00:00
15 lines
561 B
Go
15 lines
561 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 {
|
|
return ""
|
|
}
|
|
return versionInfo.Version
|
|
}
|