diff --git a/Makefile b/Makefile index 7efc8d25..bb5f03a3 100644 --- a/Makefile +++ b/Makefile @@ -168,7 +168,7 @@ release: app-build go-release go-release: @$(call print, "Creating release of lightning-terminal.") - ./scripts/release.sh build-release "$(VERSION_TAG)" "$(BUILD_SYSTEM)" "$(LND_RELEASE_TAGS)" "$(RELEASE_LDFLAGS)" + ./scripts/release.sh build-release "$(VERSION_TAG)" "$(BUILD_SYSTEM)" "$(LND_RELEASE_TAGS)" "$(RELEASE_LDFLAGS)" "$(GO_VERSION)" docker-release: app-build @$(call print, "Building release helper docker image.") diff --git a/scripts/release.sh b/scripts/release.sh index e5311387..26f41a4e 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -84,11 +84,21 @@ function red() { # build_release builds the actual release binaries. # arguments: +# function build_release() { local tag=$1 local sys=$2 local buildtags=$3 local ldflags=$4 + local goversion=$5 + + # Check if the active Go version matches the specified Go version. + active_go_version=$(go version | awk '{print $3}' | sed 's/go//') + if [ "$active_go_version" != "$goversion" ]; then + echo "Error: active Go version ($active_go_version) does not match \ +required Go version ($goversion)." + exit 1 + fi green " - Packaging vendor" go mod vendor