From 7cad45bf4510e3ee74d01d0a0ae22db73b3ba158 Mon Sep 17 00:00:00 2001 From: Dennis de Houx <152706174+Dennis-de-Houx@users.noreply.github.com> Date: Fri, 19 Apr 2024 03:40:42 +0200 Subject: [PATCH 1/4] Fix version message Show the correct bird version + status --- cmd/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/version.go b/cmd/version.go index f8fd0153..0cbf319d 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -58,6 +58,6 @@ var versionCmd = &cobra.Command{ if err != nil { log.Fatal(err) } - fmt.Printf("BIRD: %s\n", birdVersion) + fmt.Printf("BIRD: %s [%s]\n", birdVersion, birdStatus) }, } From 7af99971c7aa963256c8992ff687b844eeb44a20 Mon Sep 17 00:00:00 2001 From: Dennis de Houx <152706174+Dennis-de-Houx@users.noreply.github.com> Date: Fri, 19 Apr 2024 03:43:10 +0200 Subject: [PATCH 2/4] Fix version --- pkg/bird/bird.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/bird/bird.go b/pkg/bird/bird.go index 9cfc6ec3..5b4ba142 100644 --- a/pkg/bird/bird.go +++ b/pkg/bird/bird.go @@ -113,7 +113,7 @@ func RunCommand(command string, socket string) (string, string, error) { log.Debugf("BIRD init response: %s", resp) // Check BIRD version - birdVersion := strings.Split(resp, " ")[2] + birdVersion := strings.Split(resp, " ")[1] if semver.Compare(birdVersion, supportedMin) == -1 { log.Warnf("BIRD version %s older than minimum supported version %s", birdVersion, supportedMin) } From 8a596a1b77d9d483653e6b66a54de71a97f4fdcf Mon Sep 17 00:00:00 2001 From: Dennis de Houx <152706174+Dennis-de-Houx@users.noreply.github.com> Date: Fri, 19 Apr 2024 03:44:13 +0200 Subject: [PATCH 3/4] Revert status message --- cmd/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/version.go b/cmd/version.go index 0cbf319d..755533ac 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -58,6 +58,6 @@ var versionCmd = &cobra.Command{ if err != nil { log.Fatal(err) } - fmt.Printf("BIRD: %s [%s]\n", birdVersion, birdStatus) + fmt.Printf("BIRD: %s %s\n", birdVersion) }, } From 1fc0596bdda7d1eb3f78649bcf280e15f80a1b90 Mon Sep 17 00:00:00 2001 From: Dennis de Houx <152706174+Dennis-de-Houx@users.noreply.github.com> Date: Fri, 19 Apr 2024 03:47:25 +0200 Subject: [PATCH 4/4] Fix version --- cmd/version.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/version.go b/cmd/version.go index 755533ac..f8fd0153 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -58,6 +58,6 @@ var versionCmd = &cobra.Command{ if err != nil { log.Fatal(err) } - fmt.Printf("BIRD: %s %s\n", birdVersion) + fmt.Printf("BIRD: %s\n", birdVersion) }, }