File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,19 @@ BUILD := .build
23
23
# usually unnecessary to clean, and may require downloads to restore, so this folder is not automatically cleaned.
24
24
BIN := .bin
25
25
26
+ # current (when committed) version of Go used in CI, and ideally also our docker images.
27
+ # this generally does not matter, but can impact goimports or formatting output.
28
+ # for maximum stability, make sure you use the same version as CI uses.
29
+ #
30
+ # this can _likely_ remain a major version, as fmt output does not tend to change in minor versions,
31
+ # which will allow findstring to match any minor version.
32
+ EXPECTED_GO_VERSION := go1.16
33
+ CURRENT_GO_VERSION := $(shell go version)
34
+ ifeq (,$(findstring $(EXPECTED_GO_VERSION ) ,$(CURRENT_GO_VERSION ) ) )
35
+ # if you are seeing this warning: consider using https://github.com/travis-ci/gimme to pin your version
36
+ $(warning Caution : you are not using CI's go version. Expected: $(EXPECTED_GO_VERSION ) , current: $(CURRENT_GO_VERSION ) )
37
+ endif
38
+
26
39
# ====================================
27
40
# book-keeping files that are used to control sequencing.
28
41
#
You can’t perform that action at this time.
0 commit comments