From 3a8784287915b42c2bc72d1809f8b9b3190fc4fa Mon Sep 17 00:00:00 2001 From: Jamie Tanna Date: Sat, 1 Nov 2025 11:46:26 +0000 Subject: [PATCH] build: handle additional values in `GOVERSION` When building locally, the `make` scripts are failing on the result of: ``` $ go env GOVERSION go1.25.3 X:nodwarf5 ``` This splits the input correctly. --- examples/authenticated-api/stdhttp/Makefile | 2 +- examples/extensions/xomitzero/Makefile | 2 +- examples/minimal-server/stdhttp-go-tool/Makefile | 2 +- examples/minimal-server/stdhttp/Makefile | 2 +- .../preferskipoptionalpointerwithomitzero/Makefile | 2 +- examples/petstore-expanded/stdhttp/Makefile | 2 +- internal/test/strict-server/stdhttp/Makefile | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/authenticated-api/stdhttp/Makefile b/examples/authenticated-api/stdhttp/Makefile index 7173d70211..48fe768e30 100644 --- a/examples/authenticated-api/stdhttp/Makefile +++ b/examples/authenticated-api/stdhttp/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-122 @{ \ diff --git a/examples/extensions/xomitzero/Makefile b/examples/extensions/xomitzero/Makefile index e99db23781..bb37d63394 100644 --- a/examples/extensions/xomitzero/Makefile +++ b/examples/extensions/xomitzero/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-124 @{ \ diff --git a/examples/minimal-server/stdhttp-go-tool/Makefile b/examples/minimal-server/stdhttp-go-tool/Makefile index e99db23781..bb37d63394 100644 --- a/examples/minimal-server/stdhttp-go-tool/Makefile +++ b/examples/minimal-server/stdhttp-go-tool/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-124 @{ \ diff --git a/examples/minimal-server/stdhttp/Makefile b/examples/minimal-server/stdhttp/Makefile index 7173d70211..48fe768e30 100644 --- a/examples/minimal-server/stdhttp/Makefile +++ b/examples/minimal-server/stdhttp/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-122 @{ \ diff --git a/examples/output-options/preferskipoptionalpointerwithomitzero/Makefile b/examples/output-options/preferskipoptionalpointerwithomitzero/Makefile index e99db23781..bb37d63394 100644 --- a/examples/output-options/preferskipoptionalpointerwithomitzero/Makefile +++ b/examples/output-options/preferskipoptionalpointerwithomitzero/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-124 @{ \ diff --git a/examples/petstore-expanded/stdhttp/Makefile b/examples/petstore-expanded/stdhttp/Makefile index 7173d70211..48fe768e30 100644 --- a/examples/petstore-expanded/stdhttp/Makefile +++ b/examples/petstore-expanded/stdhttp/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-122 @{ \ diff --git a/internal/test/strict-server/stdhttp/Makefile b/internal/test/strict-server/stdhttp/Makefile index 7173d70211..48fe768e30 100644 --- a/internal/test/strict-server/stdhttp/Makefile +++ b/internal/test/strict-server/stdhttp/Makefile @@ -4,7 +4,7 @@ YELLOW := \e[0;33m RESET := \e[0;0m GOVER := $(shell go env GOVERSION) -GOMINOR := $(shell bash -c "cut -f2 -d. <<< $(GOVER)") +GOMINOR := $(shell bash -c "cut -f1 -d' ' <<< \"$(GOVER)\" | cut -f2 -d.") define execute-if-go-122 @{ \