From f178f0ec83f136647a01e01872a69d79b2af181d Mon Sep 17 00:00:00 2001 From: Mikhail Timofeev <48208649+miketimofeev@users.noreply.github.com> Date: Fri, 19 Mar 2021 15:20:27 +0300 Subject: [PATCH] [Ubuntu] Install sbt from gh releases (#2983) * Change sbt installation method to gh releases * add source install.sh --- images/linux/scripts/installers/sbt.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/images/linux/scripts/installers/sbt.sh b/images/linux/scripts/installers/sbt.sh index dd04f72a5..65f9d00c2 100644 --- a/images/linux/scripts/installers/sbt.sh +++ b/images/linux/scripts/installers/sbt.sh @@ -4,11 +4,12 @@ ## Desc: Installs sbt ################################################################################ -# Install sbt -# https://www.scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html -echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list -curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add -apt-get -q update -apt-get -y install sbt +source $HELPER_SCRIPTS/install.sh + +# Install latest sbt release +sbtVersion=$(curl -s -L "https://api.github.com/repos/sbt/sbt/releases" | jq -r '.[] | select(.prerelease==false).name' | sort --unique --version-sort | grep -ve "-.*" | tail -1) +download_with_retries "https://github.com/sbt/sbt/releases/download/v${sbtVersion}/sbt-${sbtVersion}.tgz" "/tmp" "sbt.tgz" +tar zxf /tmp/sbt.tgz -C /usr/share +ln -s /usr/share/sbt/bin/sbt /usr/bin/sbt invoke_tests "Tools" "Sbt" \ No newline at end of file