mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
makefile+scripts: add Go version check to release command
This commit updates `scripts/release.sh` to include a check for the correct Go version before executing the release build. This ensures that the release binaries are built with the specified Go version, maintaining consistency and integrity for developer signatures.
This commit is contained in:
parent
1338cfad84
commit
acf547ef3d
2 changed files with 11 additions and 1 deletions
|
|
@ -84,11 +84,21 @@ function red() {
|
|||
|
||||
# build_release builds the actual release binaries.
|
||||
# arguments: <version-tag> <build-system(s)> <build-tags> <ldflags>
|
||||
# <go-version>
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue