From 65ee904377a6c360dbafdb9b8717b527d05a66bc Mon Sep 17 00:00:00 2001 From: James Shubin Date: Mon, 23 Sep 2019 06:04:15 -0400 Subject: [PATCH] misc: Work around old golang in ubuntu Hopefully this helps. --- misc/make-deps.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/make-deps.sh b/misc/make-deps.sh index 1900d899..dadc598d 100755 --- a/misc/make-deps.sh +++ b/misc/make-deps.sh @@ -96,6 +96,16 @@ if [ $travis -eq 0 ]; then fi fi +# attempt to workaround old ubuntu +if [ ! -z "$APT" ] && go version | grep -e 'go1\.[0123456789]\.' -e 'go1\.10\.'; then + echo "install golang from a ppa." + $sudo_command $APT remove -y golang + $sudo_command $APT install -y software-properties-common # for add-apt-repository + $sudo_command add-apt-repository -y ppa:longsleep/golang-backports + $sudo_command $APT update -y + $sudo_command $APT install -y golang-go +fi + # if golang is too old, we don't want to fail with an obscure error later if go version | grep -e 'go1\.[0123456789]\.' -e 'go1\.10\.'; then echo "mgmt recommends go1.11 or higher."