From 2be09332460bc56057e99041a9497df3a3c32aef Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 29 Sep 2025 14:37:07 -0700 Subject: [PATCH] Add update checker Former-commit-id: 2445ced83ba013eee1de04b84ae2e22125301990 --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 82fbd8e..47e9a43 100644 --- a/main.go +++ b/main.go @@ -15,6 +15,7 @@ import ( "time" "github.com/fosrl/newt/logger" + "github.com/fosrl/newt/updates" "github.com/fosrl/newt/websocket" "github.com/fosrl/olm/httpserver" "github.com/fosrl/olm/peermonitor" @@ -326,6 +327,10 @@ func runOlmMainWithArgs(ctx context.Context, args []string) { logger.Info("Olm version " + olmVersion) } + if err := updates.CheckForUpdate("fosrl", "olm", olmVersion); err != nil { + logger.Debug("Failed to check for updates: %v", err) + } + // Log startup information logger.Debug("Olm service starting...") logger.Debug("Parameters: endpoint='%s', id='%s', secret='%s'", endpoint, id, secret)