release.sh: check Go version, provide GO_CMD var

This commit is contained in:
Boris Nagaev 2025-09-30 11:12:22 -03:00
parent 6d8872f995
commit 260b90d1af
No known key found for this signature in database
2 changed files with 40 additions and 2 deletions

View file

@ -58,6 +58,25 @@ other tools:
sudo apt-get install build-essential git make zip perl gpg
```
You can [download](https://go.dev/dl/) and unpack Go somewhere and set variable
`GO_CMD=/path/to/go` (path to Go binary of the needed version).
If you already have another Go version, you can install the Go version needed
for a release using the following commands:
```bash
$ go version
go version go1.25.0 linux/amd64
$ go install golang.org/dl/go1.24.6@latest
$ go1.24.6 download
Unpacking /home/user/sdk/go1.24.6/go1.24.6.linux-amd64.tar.gz ...
Success. You may now run 'go1.24.6'
$ go1.24.6 version
go version go1.24.6 linux/amd64
$ GO_CMD=/home/user/go/bin/go1.24.6 ./release.sh v0.31.3
```
On MacOS, you will need to install GNU tar and GNU gzip, which can be done with
`brew`: