diff --git a/scripts/validate b/scripts/validate index dab9f3ecd52..5f46593c8b4 100755 --- a/scripts/validate +++ b/scripts/validate @@ -22,7 +22,7 @@ function check_win_binaries() { #fi CALICO_WINDOWS_VERSION=$(grep 'CALICO_VERSION=' Dockerfile.windows | cut -d '=' -f 2- | grep -oE "v([0-9]+)\.([0-9]+)") - CALICO_LINUX_VERSION=$(grep "rke2-calico.yaml" chart_versions.csv | cut -d ',' -f 1- | grep -oE "v([0-9]+)\.([0-9]+)") + CALICO_LINUX_VERSION=$(yq '.charts[] | select(.filename == "/charts/rke2-canal.yaml").version' charts/chart_versions.yaml | cut -d ',' -f 1- | grep -oE "v([0-9]+)\.([0-9]+)") if [ ! "$CALICO_WINDOWS_VERSION" = "$CALICO_LINUX_VERSION" ]; then fatal "Calico windows binary version [$CALICO_WINDOWS_VERSION] does not match Calico chart version [$CALICO_LINUX_VERSION]" fi