bump go to 1.21 in makefile and ci.go

This commit is contained in:
Wang Gerui 2023-10-23 21:56:09 +08:00
parent 9e4b4060c0
commit 9d6adab8fb
2 changed files with 9 additions and 9 deletions

View file

@ -4,7 +4,7 @@
GOBIN = $(shell pwd)/build/bin
GOFMT = gofmt
GO ?= 1.13.1
GO ?= 1.21.3
GO_PACKAGES = .
GO_FILES := $(shell find $(shell go list -f '{{.Dir}}' $(GO_PACKAGES)) -name \*.go)

View file

@ -14,6 +14,7 @@
// You should have received a copy of the GNU Lesser General Public License
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
//go:build none
// +build none
/*
@ -23,14 +24,13 @@ Usage: go run build/ci.go <command> <command flags/arguments>
Available commands are:
install [ -arch architecture ] [ -cc compiler ] [ packages... ] -- builds packages and executables
test [ -coverage ] [ packages... ] -- runs the tests
lint -- runs certain pre-selected linters
importkeys -- imports signing keys from env
xgo [ -alltools ] [ options ] -- cross builds according to options
install [ -arch architecture ] [ -cc compiler ] [ packages... ] -- builds packages and executables
test [ -coverage ] [ packages... ] -- runs the tests
lint -- runs certain pre-selected linters
importkeys -- imports signing keys from env
xgo [ -alltools ] [ options ] -- cross builds according to options
For all commands, -n prevents execution of external programs (dry run mode).
*/
package main
@ -114,9 +114,9 @@ func doInstall(cmdline []string) {
var minor int
fmt.Sscanf(strings.TrimPrefix(runtime.Version(), "go1."), "%d", &minor)
if minor < 9 {
if minor < 21 {
log.Println("You have Go version", runtime.Version())
log.Println("XDC requires at least Go version 1.9 and cannot")
log.Println("XDC requires at least Go version 1.21 and cannot")
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
os.Exit(1)
}