mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
multi: remove unneeded env variables
With Go 1.23 we don't need to set any of these variables anymore, as they're the default values now.
This commit is contained in:
parent
70ac201cb8
commit
576da75a07
4 changed files with 8 additions and 14 deletions
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
|
@ -121,8 +121,8 @@ jobs:
|
||||||
```
|
```
|
||||||
tar -xvzf vendor.tar.gz
|
tar -xvzf vendor.tar.gz
|
||||||
tar -xvzf lnd-source-${{ env.RELEASE_VERSION }}.tar.gz
|
tar -xvzf lnd-source-${{ env.RELEASE_VERSION }}.tar.gz
|
||||||
GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=${{ env.RELEASE_VERSION }}" ./cmd/lnd
|
go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=${{ env.RELEASE_VERSION }}" ./cmd/lnd
|
||||||
GO111MODULE=on go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=${{ env.RELEASE_VERSION }}" ./cmd/lncli
|
go install -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=${{ env.RELEASE_VERSION }}" ./cmd/lncli
|
||||||
```
|
```
|
||||||
|
|
||||||
The `-mod=vendor` flag tells the `go build` command that it doesn't need to fetch the dependencies, and instead, they're all enclosed in the local vendor directory.
|
The `-mod=vendor` flag tells the `go build` command that it doesn't need to fetch the dependencies, and instead, they're all enclosed in the local vendor directory.
|
||||||
|
|
11
Makefile
11
Makefile
|
@ -25,19 +25,14 @@ COMMIT := $(shell git describe --tags --dirty)
|
||||||
ACTIVE_GO_VERSION := $(shell $(GOCC) version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
|
ACTIVE_GO_VERSION := $(shell $(GOCC) version | sed -nre 's/^[^0-9]*(([0-9]+\.)*[0-9]+).*/\1/p')
|
||||||
ACTIVE_GO_VERSION_MINOR := $(shell echo $(ACTIVE_GO_VERSION) | cut -d. -f2)
|
ACTIVE_GO_VERSION_MINOR := $(shell echo $(ACTIVE_GO_VERSION) | cut -d. -f2)
|
||||||
|
|
||||||
LOOPVARFIX :=
|
|
||||||
ifeq ($(shell expr $(ACTIVE_GO_VERSION_MINOR) \>= 21), 1)
|
|
||||||
LOOPVARFIX := GOEXPERIMENT=loopvar
|
|
||||||
endif
|
|
||||||
|
|
||||||
# GO_VERSION is the Go version used for the release build, docker files, and
|
# GO_VERSION is the Go version used for the release build, docker files, and
|
||||||
# GitHub Actions. This is the reference version for the project. All other Go
|
# GitHub Actions. This is the reference version for the project. All other Go
|
||||||
# versions are checked against this version.
|
# versions are checked against this version.
|
||||||
GO_VERSION = 1.23.6
|
GO_VERSION = 1.23.6
|
||||||
|
|
||||||
GOBUILD := $(LOOPVARFIX) $(GOCC) build -v
|
GOBUILD := $(GOCC) build -v
|
||||||
GOINSTALL := $(LOOPVARFIX) $(GOCC) install -v
|
GOINSTALL := $(GOCC) install -v
|
||||||
GOTEST := $(LOOPVARFIX) $(GOCC) test
|
GOTEST := $(GOCC) test
|
||||||
|
|
||||||
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*" -not -name "*pb.go" -not -name "*pb.gw.go" -not -name "*.pb.json.go")
|
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*" -not -name "*pb.go" -not -name "*pb.gw.go" -not -name "*.pb.json.go")
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ MAINTAINER Olaoluwa Osuntokun <laolu@lightning.engineering>
|
||||||
# Golang build related environment variables that are static and used for all
|
# Golang build related environment variables that are static and used for all
|
||||||
# architectures/OSes.
|
# architectures/OSes.
|
||||||
ENV GODEBUG netdns=cgo
|
ENV GODEBUG netdns=cgo
|
||||||
ENV GO111MODULE=auto
|
|
||||||
ENV CGO_ENABLED=0
|
ENV CGO_ENABLED=0
|
||||||
|
|
||||||
# Set up cache directories. Those will be mounted from the host system to speed
|
# Set up cache directories. Those will be mounted from the host system to speed
|
||||||
|
|
|
@ -98,7 +98,7 @@ function check_tag_correct() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build lnd to extract version.
|
# Build lnd to extract version.
|
||||||
env GOEXPERIMENT=loopvar go build ${PKG}/cmd/lnd
|
go build ${PKG}/cmd/lnd
|
||||||
|
|
||||||
# Extract version command output.
|
# Extract version command output.
|
||||||
lnd_version_output=$(./lnd --version)
|
lnd_version_output=$(./lnd --version)
|
||||||
|
@ -189,8 +189,8 @@ required Go version ($goversion)."
|
||||||
pushd "${dir}"
|
pushd "${dir}"
|
||||||
|
|
||||||
green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
|
green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
|
||||||
env GOEXPERIMENT=loopvar CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/lnd
|
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/lnd
|
||||||
env GOEXPERIMENT=loopvar CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/lncli
|
env CGO_ENABLED=0 GOOS=$os GOARCH=$arch GOARM=$arm go build -v -trimpath -ldflags="${ldflags}" -tags="${buildtags}" ${PKG}/cmd/lncli
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Add the hashes for the individual binaries as well for easy verification
|
# Add the hashes for the individual binaries as well for easy verification
|
||||||
|
|
Loading…
Add table
Reference in a new issue