diff --git a/forgejo-test-helper.sh b/forgejo-test-helper.sh index 54fa822..6cc47e3 100755 --- a/forgejo-test-helper.sh +++ b/forgejo-test-helper.sh @@ -10,12 +10,14 @@ DIR=$(mktemp -d) trap "rm -fr $DIR" EXIT function dependency_go() { + go_version="1.21.0.linux-amd64" # Set the desired Go version here + if ! which go > /dev/null ; then - apt-get update + apt-get update apt-get install -y -qq wget tar - wget --quiet https://go.dev/dl/go1.20.5.linux-amd64.tar.gz - tar zxf go1.20.5.linux-amd64.tar.gz - export PATH=$PATH:$(pwd)/go/bin + wget --quiet "https://go.dev/dl/go$go_version.tar.gz" + tar zxf "go$go_version.tar.gz" + export PATH="$PATH:$(pwd)/go/bin" fi }