Makefile: use GO macro if set, to check for version (#2706)

This commit is contained in:
mmetc 2024-01-11 09:25:33 +01:00 committed by GitHub
parent 437a97510a
commit a59ae61441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
BUILD_GOVERSION = $(subst go,,$(shell go env GOVERSION))
BUILD_GOVERSION = $(subst go,,$(shell $(GO) env GOVERSION))
go_major_minor = $(subst ., ,$(BUILD_GOVERSION))
GO_MAJOR_VERSION = $(word 1, $(go_major_minor))
@ -9,7 +9,7 @@ GO_VERSION_VALIDATION_ERR_MSG = Golang version ($(BUILD_GOVERSION)) is not suppo
.PHONY: goversion
goversion: $(if $(findstring devel,$(shell go env GOVERSION)),goversion_devel,goversion_check)
goversion: $(if $(findstring devel,$(shell $(GO) env GOVERSION)),goversion_devel,goversion_check)
.PHONY: goversion_devel