From 1132c6e652be178e15ce0cedccaaf95ade74a07c Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Wed, 23 Aug 2023 15:49:09 -0400 Subject: [PATCH] makefile: add check-dockerfile-go-version Add a new check-dockerfile-go-version makefile target and include it in the check target. This runs the recently added script to validate the version of golang used to build in container. The downside of this approach is that PRs & other work unrelated to Golang may periodically break when Go issues a new major release. Let's try this for now and if it ends up getting really annoying we can try to do some other form of automation to alert us to the need of a version bump that doesn't interfere with unrelated work. Signed-off-by: John Mulligan --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b157b1f9..5141ec99 100644 --- a/Makefile +++ b/Makefile @@ -206,9 +206,9 @@ bundle-build: @false # See vcs history for how this could be restored or adapted in the future. -.PHONY: check check-revive check-golangci-lint check-format check-yaml check-gosec +.PHONY: check check-revive check-golangci-lint check-format check-yaml check-gosec check-dockerfile-go-version -check: check-revive check-golangci-lint check-format vet check-yaml check-gosec +check: check-revive check-golangci-lint check-format vet check-yaml check-gosec check-dockerfile-go-version check-format: ! $(GOFMT_CMD) $(CHECK_GOFMT_FLAGS) . | sed 's,^,formatting error: ,' | grep 'go$$' @@ -227,6 +227,10 @@ check-yaml: check-gosec: gosec $(GOSEC) -quiet -exclude=G101 -fmt json ./... +check-dockerfile-go-version: + # use go-version-check.sh --show to list vaild golang builder images + $(CURDIR)/hack/go-version-check.sh --check + check-gitlint: gitlint $(GITLINT) -C .gitlint --commits origin/master.. lint