diff --git a/scripts/versions_check.sh b/scripts/versions_check.sh index de84f4fdfe..4a4e75b2e1 100644 --- a/scripts/versions_check.sh +++ b/scripts/versions_check.sh @@ -1,41 +1,22 @@ #!/usr/bin/env bash set -euo pipefail # Bash "strict mode" -GO_VERSION=1.18 +# VERSION NUMBERS +# FOR GO WE EXPECT _AT LEAST_ THIS VERSION, BUT WE ARE OK WITH SUPERIOR VERSIONS +GO_VERSION=1.20rc3 + +# FOR NODE, WE PIN THE EXACT VERSION NUMBER NODE_VERSION=16.14.0 + + RED_BG=$(tput setab 1) +BLUE_BG=$(tput setab 4) WHITE_FG=$(tput setaf 7) NORMAL_BG=$(tput sgr0;) BOLD=$(tput bold) error=false; -echo " " - -function parse_semver() { - local token="$1" - local major=0 - local minor=0 - local patch=0 - - if egrep '^[0-9]+\.[0-9]+(\.[0-9]+)?' <<<"${token}" >/dev/null 2>&1 ; then - # It has the correct syntax. - local n=${token//[!0-9]/ } - local a=(${n//\./ }) - fi - - echo "${a[@]}" -} - -function compare_versions() { - local expected=($(parse_semver "$1")) - local found=($(parse_semver "$2")) - local len=${#expected[@]} - for (( i=0; i /dev/null