Don't use declare -g in build

parent b7ce1ed3
...@@ -163,10 +163,10 @@ kube::golang::dedup() { ...@@ -163,10 +163,10 @@ kube::golang::dedup() {
# to readonly. # to readonly.
# The configured vars will only contain platforms allowed by the # The configured vars will only contain platforms allowed by the
# KUBE_SUPPORTED* vars at the top of this file. # KUBE_SUPPORTED* vars at the top of this file.
declare -a -g KUBE_SERVER_PLATFORMS declare -a KUBE_SERVER_PLATFORMS
declare -a -g KUBE_CLIENT_PLATFORMS declare -a KUBE_CLIENT_PLATFORMS
declare -a -g KUBE_NODE_PLATFORMS declare -a KUBE_NODE_PLATFORMS
declare -a -g KUBE_TEST_PLATFORMS declare -a KUBE_TEST_PLATFORMS
kube::golang::setup_platforms() { kube::golang::setup_platforms() {
if [[ -n "${KUBE_BUILD_PLATFORMS:-}" ]]; then if [[ -n "${KUBE_BUILD_PLATFORMS:-}" ]]; then
# KUBE_BUILD_PLATFORMS needs to be read into an array before the next # KUBE_BUILD_PLATFORMS needs to be read into an array before the next
...@@ -219,7 +219,7 @@ kube::golang::setup_platforms() { ...@@ -219,7 +219,7 @@ kube::golang::setup_platforms() {
KUBE_CLIENT_PLATFORMS=( KUBE_CLIENT_PLATFORMS=(
darwin/amd64 darwin/amd64
linux/amd64 linux/amd64
) )
readonly KUBE_CLIENT_PLATFORMS readonly KUBE_CLIENT_PLATFORMS
else else
KUBE_TEST_PLATFORMS=(linux/amd64) KUBE_TEST_PLATFORMS=(linux/amd64)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment