From 1dd21ba5074b67676464e6485c306945bceccb73 Mon Sep 17 00:00:00 2001 From: Amir Alavi Date: Sat, 8 Jun 2024 18:25:56 -0400 Subject: [PATCH] use jq to parse go version per pr feedback Signed-off-by: Amir Alavi --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e444634a6..0264577d6 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ HAS_GOLANGCI := $(shell ls _output/bin/golangci-lint 2> /dev/null) GOFUMPT_VERSION := v0.4.0 HAS_GOFUMPT := $(shell command -v gofumpt 2> /dev/null) -GO_VERSION := $(shell sed -En 's/^go (.*)$$/\1/p' go.mod) +GO_VERSION := $(shell (command -v jq > /dev/null && (go mod edit -json | jq -r .Go)) || (sed -En 's/^go (.*)$$/\1/p' go.mod)) # REGISTRY is the container registry to push # into. The default is to push to the staging