From db1cc5e455078cc82f606454de5768c6596d9fdd Mon Sep 17 00:00:00 2001 From: Quique Llorente Date: Tue, 18 Jan 2022 16:10:29 +0100 Subject: [PATCH] automation: Install go.mod go with gimme Signed-off-by: Quique Llorente --- automation/check-patch.setup.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/automation/check-patch.setup.sh b/automation/check-patch.setup.sh index 594abc8e8..2f57e081f 100755 --- a/automation/check-patch.setup.sh +++ b/automation/check-patch.setup.sh @@ -8,6 +8,14 @@ tmp_dir=/tmp/knmstate/ rm -rf $tmp_dir mkdir -p $tmp_dir +if gimme --help > /dev/null 2>&1; then + export GIMME_GO_VERSION=$(grep '^go' go.mod |sed 's/go //') + echo "Installing go $GIMME_GO_VERSION with gimme" + eval "$(gimme)" +else + echo "Gimme not installed using existing golang version $(go --version)" +fi + export ARCHS="amd64 arm64" export TMP_PROJECT_PATH=$tmp_dir/kubernetes-nmstate export E2E_LOGS=${TMP_PROJECT_PATH}/test_logs/e2e