Skip to content

Commit

Permalink
Merge pull request #9328 from guggero/golang-min-version
Browse files Browse the repository at this point in the history
docker+docs: update documentation around Golang minimum version
  • Loading branch information
guggero authored Dec 2, 2024
2 parents 0474b4f + 2fdfa26 commit 0c9b655
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 35 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ env:

TRANCHES: 8

# If you change this value, please change it in the following files as well:
# /.travis.yml
# /Dockerfile
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/release.yml
# 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_VERSION: 1.22.6

jobs:
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ defaults:
shell: bash

env:
# If you change this value, please change it in the following files as well:
# /Dockerfile
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# 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_VERSION: 1.22.6

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
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"

# Abort after 10 minutes.
Expand Down
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# If you change this value, please change it in the following files as well:
# /dev.Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
# 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

# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
Expand Down
7 changes: 2 additions & 5 deletions dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# If you change this value, please change it in the following files as well:
# /Dockerfile
# /make/builder.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
# 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

LABEL maintainer="Olaoluwa Osuntokun <[email protected]>"
Expand Down
2 changes: 2 additions & 0 deletions docker/btcd/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

LABEL maintainer="Olaoluwa Osuntokun <[email protected]>"
Expand Down
15 changes: 8 additions & 7 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,23 +93,24 @@ following build dependencies are required:

### Installing Go

`lnd` is written in Go, with a minimum version of 1.19. To install, run one of
the following commands for your OS:
`lnd` is written in Go, with a minimum version of `1.22.6` (or, in case this
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>
<summary>Linux (x86-64)</summary>

```
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
`999805bed7d9039ec3da1a53bfbcafc13e367da52aa823cb60b68ba22d44c616`. If it
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:
```
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
```
</details>
Expand All @@ -118,16 +119,16 @@ the following commands for your OS:
<summary>Linux (ARMv6)</summary>

```
wget https://dl.google.com/go/go1.22.5.linux-armv6l.tar.gz
sha256sum go1.22.5.linux-armv6l.tar.gz | awk -F " " '{ print $1 }'
wget https://dl.google.com/go/go1.22.6.linux-armv6l.tar.gz
sha256sum go1.22.6.linux-armv6l.tar.gz | awk -F " " '{ print $1 }'
```

The final output of the command above should be
`b566484fe89a54c525dd1a4cbfec903c1f6e8f0b7b3dbaf94c79bc9145391083`. If it
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:
```
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
```

Expand Down
5 changes: 3 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
// 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

// If you change this please also update .github/pull_request_template.md,
// docs/INSTALL.md and GO_IMAGE in lnrpc/gen_protos_docker.sh.
// If you change this please also update docs/INSTALL.md and GO_VERSION in
// Makefile (then run `make lint` to see where else it needs to be updated as
// well).
go 1.22.6

retract v0.0.2
2 changes: 2 additions & 0 deletions lnrpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

RUN apt-get update && apt-get install -y \
Expand Down
7 changes: 2 additions & 5 deletions make/builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# If you change this value, please change it in the following files as well:
# /Dockerfile
# /dev.Dockerfile
# /.github/workflows/main.yml
# /.github/workflows/release.yml
# 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

MAINTAINER Olaoluwa Osuntokun <[email protected]>
Expand Down

0 comments on commit 0c9b655

Please sign in to comment.