Merge pull request #9328 from guggero/golang-min-version

docker+docs: update documentation around Golang minimum version
This commit is contained in:
Oliver Gugger 2024-12-02 11:22:57 +01:00 committed by GitHub
commit 0c9b65578f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 27 additions and 35 deletions

View file

@ -25,12 +25,8 @@ env:
TRANCHES: 8 TRANCHES: 8
# If you change this value, please change it in the following files as well: # If you change this please also update GO_VERSION in Makefile (then run
# /.travis.yml # `make lint` to see where else it needs to be updated as well).
# /Dockerfile
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/release.yml
GO_VERSION: 1.22.6 GO_VERSION: 1.22.6
jobs: jobs:

View file

@ -10,11 +10,8 @@ defaults:
shell: bash shell: bash
env: env:
# If you change this value, please change it in the following files as well: # If you change this please also update GO_VERSION in Makefile (then run
# /Dockerfile # `make lint` to see where else it needs to be updated as well).
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
GO_VERSION: 1.22.6 GO_VERSION: 1.22.6
jobs: jobs:

View file

@ -1,4 +1,6 @@
run: run:
# If you change this please also update GO_VERSION in Makefile (then run
# `make lint` to see where else it needs to be updated as well).
go: "1.22.6" go: "1.22.6"
# Abort after 10 minutes. # Abort after 10 minutes.

View file

@ -1,8 +1,5 @@
# If you change this value, please change it in the following files as well: # If you change this please also update GO_VERSION in Makefile (then run
# /dev.Dockerfile # `make lint` to see where else it needs to be updated as well).
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
FROM golang:1.22.6-alpine as builder FROM golang:1.22.6-alpine as builder
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS # Force Go to use the cgo based DNS resolver. This is required to ensure DNS

View file

@ -1,8 +1,5 @@
# If you change this value, please change it in the following files as well: # If you change this please also update GO_VERSION in Makefile (then run
# /Dockerfile # `make lint` to see where else it needs to be updated as well).
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
FROM golang:1.22.6-alpine as builder FROM golang:1.22.6-alpine as builder
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>" LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"

View file

@ -1,3 +1,5 @@
# If you change this please also update GO_VERSION in Makefile (then run
# `make lint` to see where else it needs to be updated as well).
FROM golang:1.22.6-alpine as builder FROM golang:1.22.6-alpine as builder
LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>" LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>"

View file

@ -93,15 +93,16 @@ following build dependencies are required:
### Installing Go ### Installing Go
`lnd` is written in Go, with a minimum version of 1.19. To install, run one of `lnd` is written in Go, with a minimum version of `1.22.6` (or, in case this
the following commands for your OS: document gets out of date, whatever the Go version in the main `go.mod` file
requires). To install, run one of the following commands for your OS:
<details> <details>
<summary>Linux (x86-64)</summary> <summary>Linux (x86-64)</summary>
``` ```
wget https://dl.google.com/go/go1.22.6.linux-amd64.tar.gz wget https://dl.google.com/go/go1.22.6.linux-amd64.tar.gz
sha256sum go1.22.5.linux-amd64.tar.gz | awk -F " " '{ print $1 }' sha256sum go1.22.6.linux-amd64.tar.gz | awk -F " " '{ print $1 }'
``` ```
The final output of the command above should be The final output of the command above should be
@ -109,7 +110,7 @@ the following commands for your OS:
isn't, then the target REPO HAS BEEN MODIFIED, and you shouldn't install isn't, then the target REPO HAS BEEN MODIFIED, and you shouldn't install
this version of Go. If it matches, then proceed to install Go: this version of Go. If it matches, then proceed to install Go:
``` ```
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.5.linux-amd64.tar.gz sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.6.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/usr/local/go/bin
``` ```
</details> </details>
@ -118,8 +119,8 @@ the following commands for your OS:
<summary>Linux (ARMv6)</summary> <summary>Linux (ARMv6)</summary>
``` ```
wget https://dl.google.com/go/go1.22.5.linux-armv6l.tar.gz wget https://dl.google.com/go/go1.22.6.linux-armv6l.tar.gz
sha256sum go1.22.5.linux-armv6l.tar.gz | awk -F " " '{ print $1 }' sha256sum go1.22.6.linux-armv6l.tar.gz | awk -F " " '{ print $1 }'
``` ```
The final output of the command above should be The final output of the command above should be
@ -127,7 +128,7 @@ the following commands for your OS:
isn't, then the target REPO HAS BEEN MODIFIED, and you shouldn't install isn't, then the target REPO HAS BEEN MODIFIED, and you shouldn't install
this version of Go. If it matches, then proceed to install Go: this version of Go. If it matches, then proceed to install Go:
``` ```
sudo rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.5.linux-armv6l.tar.gz sudo rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.6.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/usr/local/go/bin
``` ```

5
go.mod
View file

@ -207,8 +207,9 @@ replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
// allows us to specify that as an option. // allows us to specify that as an option.
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display
// If you change this please also update .github/pull_request_template.md, // If you change this please also update docs/INSTALL.md and GO_VERSION in
// docs/INSTALL.md and GO_IMAGE in lnrpc/gen_protos_docker.sh. // Makefile (then run `make lint` to see where else it needs to be updated as
// well).
go 1.22.6 go 1.22.6
retract v0.0.2 retract v0.0.2

View file

@ -1,3 +1,5 @@
# If you change this please also update GO_VERSION in Makefile (then run
# `make lint` to see where else it needs to be updated as well).
FROM golang:1.22.6-bookworm FROM golang:1.22.6-bookworm
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \

View file

@ -1,8 +1,5 @@
# If you change this value, please change it in the following files as well: # If you change this please also update GO_VERSION in Makefile (then run
# /Dockerfile # `make lint` to see where else it needs to be updated as well).
# /dev.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
FROM golang:1.22.6-bookworm FROM golang:1.22.6-bookworm
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.engineering> MAINTAINER Olaoluwa Osuntokun <laolu@lightning.engineering>