Skip to content

Commit

Permalink
test(storage): fix version checking logic (#5254)
Browse files Browse the repository at this point in the history
Fixes version checking logic for emulator tests
  • Loading branch information
tritone committed Dec 23, 2021
1 parent 60dc590 commit 2fb039c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions storage/emulator_test.sh
Expand Up @@ -19,13 +19,15 @@ set -eo pipefail
# Display commands being run
set -x

# Only run on the latest
min_ver=1.17
# Only run on Go 1.17+
min_minor_ver=17

v=`go version | { read _ _ v _; echo ${v#go}; }`
v=${v%.*}
comps=(${v//./ })
minor_ver=${comps[1]}

if (( $(echo "$v < $min_ver" |bc -l) )); then
if [ "$minor_ver" -lt "$min_minor_ver" ]; then
echo minor version $minor_ver, skipping
exit 0
fi

Expand Down

0 comments on commit 2fb039c

Please sign in to comment.