Skip to content

Commit

Permalink
makefile: add check-dockerfile-go-version
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
phlogistonjohn authored and mergify[bot] committed Aug 28, 2023
1 parent 778b210 commit ec7f469
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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$$'
Expand All @@ -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

Expand Down

0 comments on commit ec7f469

Please sign in to comment.