File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,18 @@ function compile_check {
2020 # Change the directory to the compilecheck test directory.
2121 cd ${COMPILE_CHECK_DIR}
2222
23+ # If the Go version is 1.15 or greater, then run "go mod tidy".
24+ MACHINE_VERSION=` ${GC} version | { read _ _ v _; echo ${v# go} ; }`
25+ if [ $( version $MACHINE_VERSION ) -ge $( version 1.15) ]; then
26+ go mod tidy
27+ fi
28+
2329 # Test vendoring
2430 go mod vendor
2531 ${GC} build -mod=vendor
2632
2733 rm -rf vendor
2834
29- MACHINE_VERSION=` ${GC} version | { read _ _ v _; echo ${v# go} ; }`
30-
31- # If the version is not 1.13, then run "go mod tidy"
32- if [ $( version $MACHINE_VERSION ) -ge $( version 1.15) ]; then
33- go mod tidy
34- fi
35-
3635 # Check simple build.
3736 ${GC} build ./...
3837
You can’t perform that action at this time.
0 commit comments