Skip to content

Commit d45cc10

Browse files
authored
Merge pull request kubernetes#77985 from adisky/patch-2
fix unbound variable build/lib/release.sh bash 4.3
2 parents 9cbbf59 + 7e2aa46 commit d45cc10

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

hack/lib/golang.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ kube::golang::dedup() {
165165
# KUBE_SUPPORTED* vars at the top of this file.
166166
declare -a -g KUBE_SERVER_PLATFORMS
167167
declare -a -g KUBE_CLIENT_PLATFORMS
168+
declare -a -g KUBE_NODE_PLATFORMS
169+
declare -a -g KUBE_TEST_PLATFORMS
168170
kube::golang::setup_platforms() {
169171
if [[ -n "${KUBE_BUILD_PLATFORMS:-}" ]]; then
170172
# KUBE_BUILD_PLATFORMS needs to be read into an array before the next
@@ -206,19 +208,22 @@ kube::golang::setup_platforms() {
206208
elif [[ "${KUBE_FASTBUILD:-}" == "true" ]]; then
207209
KUBE_SERVER_PLATFORMS=(linux/amd64)
208210
readonly KUBE_SERVER_PLATFORMS
209-
readonly KUBE_NODE_PLATFORMS=(linux/amd64)
211+
KUBE_NODE_PLATFORMS=(linux/amd64)
212+
readonly KUBE_NODE_PLATFORMS
210213
if [[ "${KUBE_BUILDER_OS:-}" == "darwin"* ]]; then
211-
readonly KUBE_TEST_PLATFORMS=(
214+
KUBE_TEST_PLATFORMS=(
212215
darwin/amd64
213216
linux/amd64
214217
)
218+
readonly KUBE_TEST_PLATFORMS
215219
KUBE_CLIENT_PLATFORMS=(
216220
darwin/amd64
217221
linux/amd64
218222
)
219223
readonly KUBE_CLIENT_PLATFORMS
220224
else
221-
readonly KUBE_TEST_PLATFORMS=(linux/amd64)
225+
KUBE_TEST_PLATFORMS=(linux/amd64)
226+
readonly KUBE_TEST_PLATFORMS
222227
KUBE_CLIENT_PLATFORMS=(linux/amd64)
223228
readonly KUBE_CLIENT_PLATFORMS
224229
fi

0 commit comments

Comments
 (0)