build: build+install using GOEXPERIMENT=loopvar

We also update the release script to do the same as well.
This commit is contained in:
Olaoluwa Osuntokun
2023-10-04 15:41:19 -07:00
parent 206ad69b75
commit 63a94ad987
2 changed files with 14 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ function check_tag_correct() {
fi
# Build lnd to extract version.
go build ${PKG}/cmd/lnd
env GOEXPERIMENT=loopvar go build ${PKG}/cmd/lnd
# Extract version command output.
lnd_version_output=$(./lnd --version)
@@ -177,8 +177,8 @@ function build_release() {
pushd "${dir}"
green " - Building: ${os} ${arch} ${arm} with build tags '${buildtags}'"
env 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/lncli
env GOEXPERIMENT=loopvar 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
popd
# Add the hashes for the individual binaries as well for easy verification