Skip to content

Commit ec7f469

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
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 <[email protected]>
1 parent 778b210 commit ec7f469

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ bundle-build:
206206
@false
207207
# See vcs history for how this could be restored or adapted in the future.
208208

209-
.PHONY: check check-revive check-golangci-lint check-format check-yaml check-gosec
209+
.PHONY: check check-revive check-golangci-lint check-format check-yaml check-gosec check-dockerfile-go-version
210210

211-
check: check-revive check-golangci-lint check-format vet check-yaml check-gosec
211+
check: check-revive check-golangci-lint check-format vet check-yaml check-gosec check-dockerfile-go-version
212212

213213
check-format:
214214
! $(GOFMT_CMD) $(CHECK_GOFMT_FLAGS) . | sed 's,^,formatting error: ,' | grep 'go$$'
@@ -227,6 +227,10 @@ check-yaml:
227227
check-gosec: gosec
228228
$(GOSEC) -quiet -exclude=G101 -fmt json ./...
229229

230+
check-dockerfile-go-version:
231+
# use go-version-check.sh --show to list vaild golang builder images
232+
$(CURDIR)/hack/go-version-check.sh --check
233+
230234
check-gitlint: gitlint
231235
$(GITLINT) -C .gitlint --commits origin/master.. lint
232236

0 commit comments

Comments
 (0)