File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ THOR_VERSION = $(shell cat cmd/thor/VERSION)
7
7
DISCO_VERSION = $(shell cat cmd/disco/VERSION)
8
8
9
9
PACKAGES = ` go list ./... | grep -v ' /vendor/' `
10
-
10
+ REQUIRED_GO_MAJOR = 1
11
+ REQUIRED_GO_MINOR = 24
11
12
MAJOR = $(shell go version | cut -d' ' -f3 | cut -b 3- | cut -d. -f1)
12
13
MINOR = $(shell go version | cut -d' ' -f3 | cut -b 3- | cut -d. -f2)
13
14
export GO111MODULE =on
@@ -32,12 +33,12 @@ dep:| go_version_check
32
33
@go mod download
33
34
34
35
go_version_check :
35
- @if test $(MAJOR ) -lt 1 ; then \
36
- echo " Go 1.24 or higher required" ; \
36
+ @if test $(MAJOR ) -lt $( REQUIRED_GO_MAJOR ) ; then \
37
+ echo " Go $( REQUIRED_GO_MAJOR ) . $( REQUIRED_GO_MINOR ) or higher required" ; \
37
38
exit 1; \
38
39
else \
39
- if test $( MAJOR) -eq 1 -a $( MINOR) -lt 22 ; then \
40
- echo " Go 1.24 or higher required" ; \
40
+ if test $( MAJOR) -eq $( REQUIRED_GO_MAJOR ) -a $( MINOR) -lt $( REQUIRED_GO_MINOR ) ; then \
41
+ echo " Go $( REQUIRED_GO_MAJOR ) . $( REQUIRED_GO_MINOR ) or higher required" ; \
41
42
exit 1; \
42
43
fi \
43
44
fi
You can’t perform that action at this time.
0 commit comments