diff --git a/builder-base/scripts/check_upstream_golang.sh b/builder-base/scripts/check_upstream_golang.sh index 974499ba1..60a775536 100755 --- a/builder-base/scripts/check_upstream_golang.sh +++ b/builder-base/scripts/check_upstream_golang.sh @@ -60,7 +60,7 @@ ACTIVE_VERSIONS=$(curl https://go.dev/dl/?mode=json | jq -r '.[].version' | sed for version in ${ACTIVE_VERSIONS}; do # pull golang versions in the versions.yaml MAJORVERSION=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) - BUILDER_BASE_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_${MAJORVERSION//./}") || "" + BUILDER_BASE_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_VERSION_${MAJORVERSION//./}") || echo "" # check builder-base versions for the upstream version of golang # if the version doesn't exist in the builder base update the versions yaml. if [[ -n $BUILDER_BASE_GO_VERSION && ! $BUILDER_BASE_GO_VERSION =~ $version ]]; then diff --git a/eks-distro-base/scripts/check_upstream_golang b/eks-distro-base/scripts/check_upstream_golang index a9782b94d..c5a4b22bb 100755 --- a/eks-distro-base/scripts/check_upstream_golang +++ b/eks-distro-base/scripts/check_upstream_golang @@ -41,7 +41,7 @@ ACTIVE_VERSIONS=$(curl https://go.dev/dl/?mode=json | jq -r '.[].version' | sed for version in ${ACTIVE_VERSIONS}; do # pull golang versions in the versions.yaml MAJORVERSION=$(if [[ $(echo "$version" | awk -F'.' '{print NF}') -ge 3 ]]; then echo ${version%.*}; else echo ${version%-*}; fi) - MINIMAL_GO_VERSION=$(cat "${VERSIONS_YAML}" | grep -E "^GOLANG_${MAJORVERSION}_FULL_VERSION") || "" + MINIMAL_GO_VERSION=$(yq ".golang.versions[\"GOLANG_${MAJORVERSION}_FULL_VERSION\"]" "$VERSIONS_YAML" || echo "") # check builder-base versions for the upstream version of golang # if the version doesn't exist in the builder base update the versions yaml. if [[ ! $MINIMAL_GO_VERSION =~ $version ]]; then