From 3c650e3979c95f9666566cbdd0a274d6b9a73227 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 31 May 2022 02:45:51 -0400 Subject: [PATCH] revise go version check --- preflight.sh | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/preflight.sh b/preflight.sh index 34877b4..5ebc0ab 100644 --- a/preflight.sh +++ b/preflight.sh @@ -2,23 +2,12 @@ set -e go version > /dev/null 2>&1 || (echo go 1.16+ is required && false) -v=`go version | egrep -o 'go1[^ ]+'` -case $v in - go1.10*|go1.11*|go1.12*|go1.13*|go1.14*|go1.15*) - echo go version is too old: $v - echo go 1.16+ is required - false - ;; - go1.1*) - # just pretend nobody is still using go 1.1 or 1.2 - ;; - go1.2*) - ;; - *) - echo unknown go version: $v - false - ;; -esac +v=`go version | egrep -o "go1\.[^.]+"` || echo failed to identify go version +if [ "$v" \< "go1.16" ] ; then + echo go version is too old: $v + echo go 1.16+ is required + false +fi if [ \! \( -e /usr/include/sqlite3.h -o -e /usr/local/include/sqlite3.h \) ] ; then echo unable to find sqlite3.h header