File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ release-install:
162
162
release : clean-mobile
163
163
@$(call print, "Releasing lnd and lncli binaries.")
164
164
$(VERSION_CHECK )
165
- ./scripts/release.sh build-release " $( VERSION_TAG) " " $( BUILD_SYSTEM) " " $( RELEASE_TAGS) " " $( RELEASE_LDFLAGS) "
165
+ ./scripts/release.sh build-release " $( VERSION_TAG) " " $( BUILD_SYSTEM) " " $( RELEASE_TAGS) " " $( RELEASE_LDFLAGS) " " $( GO_VERSION ) "
166
166
167
167
# ? docker-release: Same as release but within a docker container to support reproducible builds on BSD/MacOS platforms
168
168
docker-release :
Original file line number Diff line number Diff line change @@ -129,11 +129,23 @@ function check_tag_correct() {
129
129
130
130
# build_release builds the actual release binaries.
131
131
# arguments: <version-tag> <build-system(s)> <build-tags> <ldflags>
132
+ # <go-version>
132
133
function build_release() {
133
134
local tag=$1
134
135
local sys=$2
135
136
local buildtags=$3
136
137
local ldflags=$4
138
+ local goversion=$5
139
+
140
+ # Check if the active Go version matches the specified Go version.
141
+ active_go_version=$( go version | awk ' {print $3}' | sed ' s/go//' )
142
+ if [ " $active_go_version " != " $goversion " ]; then
143
+ echo " Error: active Go version ($active_go_version ) does not match \
144
+ required Go version ($goversion )."
145
+ exit 1
146
+ fi
147
+
148
+ echo " Building release for tag $tag with Go version $goversion "
137
149
138
150
green " - Packaging vendor"
139
151
go mod vendor
@@ -202,7 +214,7 @@ function build_release() {
202
214
function usage() {
203
215
red " Usage: "
204
216
red " release.sh check-tag <version-tag>"
205
- red " release.sh build-release <version-tag> <build-system(s)> <build-tags> <ldflags>"
217
+ red " release.sh build-release <version-tag> <build-system(s)> <build-tags> <ldflags> <go-version> "
206
218
}
207
219
208
220
# Whatever sub command is passed in, we need at least 2 arguments.
You can’t perform that action at this time.
0 commit comments