From 3c0a9c314bdb32567a806055cc9f8528db082af0 Mon Sep 17 00:00:00 2001 From: Eduard Gert Date: Tue, 2 Jun 2026 09:37:21 +0200 Subject: [PATCH] add gui version --- client/ui/services/version.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 client/ui/services/version.go diff --git a/client/ui/services/version.go b/client/ui/services/version.go new file mode 100644 index 000000000..82034ec37 --- /dev/null +++ b/client/ui/services/version.go @@ -0,0 +1,25 @@ +//go:build !android && !ios && !freebsd && !js + +package services + +import ( + "context" + + "github.com/netbirdio/netbird/version" +) + +// Version is the Wails-bound facade exposing the GUI version baked in at +// build time via -ldflags. The tray reads version.NetbirdVersion() directly; +// this service exists so the React layer can show the same string instead +// of the static placeholder in frontend/package.json. +type Version struct{} + +func NewVersion() *Version { + return &Version{} +} + +// GUI returns the GUI version string (e.g. "0.65.0" in release builds, +// "development" in dev builds). +func (s *Version) GUI(_ context.Context) (string, error) { + return version.NetbirdVersion(), nil +}