From c820a3a7f39154c9853fe3efbacd62a53a039c80 Mon Sep 17 00:00:00 2001 From: riccardom Date: Mon, 25 May 2026 22:49:48 +0200 Subject: [PATCH] Adjust for "v0.31.1-dev" test case which must be considered pre-release --- version/version.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/version/version.go b/version/version.go index 174720870..f33ff133c 100644 --- a/version/version.go +++ b/version/version.go @@ -67,6 +67,10 @@ func NetbirdCommit() string { // a non-release / development build. It is the single source of truth for // "is this a dev build" checks across the codebase; use it instead of // comparing against the "development" literal or ad-hoc substring checks. +// +// Matches the bare DevelopmentVersion constant as well as any future +// extension such as "development-" or "development--dirty", +// while excluding tagged prereleases like "v0.31.1-dev". func IsDevelopmentVersion(v string) bool { - return strings.Contains(v, "dev") + return strings.HasPrefix(v, DevelopmentVersion) }